diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-24 18:14:24 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-24 18:14:24 -0400 |
commit | 2721f3768ebd4d279caa967bee210249d93f92cb (patch) | |
tree | d398e3791dd03134ab3f40d41191abc073a8bad4 /app/assets/javascripts | |
parent | 012b083cbd74ab687d5529258ff045319265e594 (diff) | |
download | pokeviewer-2721f3768ebd4d279caa967bee210249d93f92cb.tar.gz pokeviewer-2721f3768ebd4d279caa967bee210249d93f92cb.tar.bz2 pokeviewer-2721f3768ebd4d279caa967bee210249d93f92cb.zip |
Worked on PC display page
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/pokeviewer/application.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/pokeviewer/pokemon.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/pokeviewer/pokemon.js.coffee | 7 |
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}) | ||