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/application.js1
-rw-r--r--app/assets/javascripts/pokeviewer/pokemon.js2
-rw-r--r--app/assets/javascripts/pokeviewer/pokemon.js.coffee7
3 files changed, 8 insertions, 2 deletions
diff --git a/app/assets/javascripts/pokeviewer/application.js b/app/assets/javascripts/pokeviewer/application.js index e54c646..52d2214 100644 --- a/app/assets/javascripts/pokeviewer/application.js +++ b/app/assets/javascripts/pokeviewer/application.js
@@ -10,4 +10,5 @@
10// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details 10// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11// about supported directives. 11// about supported directives.
12// 12//
13//= require jquery3
13//= require_tree . 14//= require_tree .
diff --git a/app/assets/javascripts/pokeviewer/pokemon.js b/app/assets/javascripts/pokeviewer/pokemon.js deleted file mode 100644 index dee720f..0000000 --- a/app/assets/javascripts/pokeviewer/pokemon.js +++ /dev/null
@@ -1,2 +0,0 @@
1// Place all the behaviors and hooks related to the matching controller here.
2// All this logic will automatically be available in application.js.
diff --git a/app/assets/javascripts/pokeviewer/pokemon.js.coffee b/app/assets/javascripts/pokeviewer/pokemon.js.coffee new file mode 100644 index 0000000..f82f196 --- /dev/null +++ b/app/assets/javascripts/pokeviewer/pokemon.js.coffee
@@ -0,0 +1,7 @@
1$ ->
2 $(".pc-pokemon").mouseover ->
3 $(this).children(".pc-data").show()
4 $(".pc-pokemon").mouseout ->
5 $(this).children(".pc-data").hide()
6 $(".pc-pokemon").mousemove (event) ->
7 $(this).children(".pc-data").offset({left: event.pageX + 16, top: event.pageY - 16})