summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/wwwroot/Content/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/wwwroot/Content/js/index.js')
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/index.js26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/SMAPI.Web/wwwroot/Content/js/index.js b/src/SMAPI.Web/wwwroot/Content/js/index.js
index 54fdf6d9..c53592f8 100644
--- a/src/SMAPI.Web/wwwroot/Content/js/index.js
+++ b/src/SMAPI.Web/wwwroot/Content/js/index.js
@@ -1,16 +1,10 @@
-document.addEventListener('DOMContentLoaded', setupHover, false);
-
-function setupHover() {
- var pufferchick = document.getElementById("pufferchick");
- var downloadLinks = document.getElementsByClassName("download");
-
- for (var downloadLink of downloadLinks) {
- downloadLink.addEventListener("mouseenter", function () {
- pufferchick.src = "Content/images/pufferchick-cool.png";
- });
-
- downloadLink.addEventListener("mouseleave", function () {
- pufferchick.src = "favicon.ico";
- });
- }
-}
+$(document).ready(function () {
+ var pufferchick = $("#pufferchick");
+ $(".download").each(function (index, element) {
+ $(element).hover(function () {
+ pufferchick.attr("src", "Content/images/pufferchick-cool.png");
+ }, function () {
+ pufferchick.attr("src", "favicon.ico");
+ })
+ });
+});