about summary refs log tree commit diff stats
path: root/app/assets/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/pokeviewer/pokemon.js.coffee10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/pokeviewer/pokemon.js.coffee b/app/assets/javascripts/pokeviewer/pokemon.js.coffee index a6fd326..e80ae77 100644 --- a/app/assets/javascripts/pokeviewer/pokemon.js.coffee +++ b/app/assets/javascripts/pokeviewer/pokemon.js.coffee
@@ -1,3 +1,9 @@
1show_pokemon_tab = (tab) ->
2 $(".pokemon-tab").hide()
3 $(".ptabe-button").removeClass("active")
4 $(".pokemon-" + tab).show()
5 $(".ptabe-" + tab).addClass("active")
6
1$ -> 7$ ->
2 $(".pkv-has-hover").mouseover -> 8 $(".pkv-has-hover").mouseover ->
3 $(this).children(".pkv-hover").show() 9 $(this).children(".pkv-hover").show()
@@ -7,3 +13,7 @@ $ ->
7 $(this).children(".pkv-hover").offset({left: event.pageX + 16, top: event.pageY - 16}) 13 $(this).children(".pkv-hover").offset({left: event.pageX + 16, top: event.pageY - 16})
8 $(".in-emerald .pokemon-image img").mouseover -> 14 $(".in-emerald .pokemon-image img").mouseover ->
9 $(this).attr("src", $(this)[0].src) 15 $(this).attr("src", $(this)[0].src)
16 $(".ptabe-button a").click ->
17 show_pokemon_tab($(this).data("tab"))
18 if $("#pokemon-embed").length > 0
19 show_pokemon_tab("details")