aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/010-control.js
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2011-05-16 02:51:33 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2011-05-16 02:51:33 -0400
commit3c7fc8cfdd86873d665858265a26c9268ab99bab (patch)
treea0b0939e266390f5fa3332a51532542345e3aeb3 /web/js/010-control.js
parentSupport facebook meta tags. (diff)
downloadPhotoFloat-3c7fc8cfdd86873d665858265a26c9268ab99bab.tar.xz
PhotoFloat-3c7fc8cfdd86873d665858265a26c9268ab99bab.zip
Add scroll wheel support.
Diffstat (limited to 'web/js/010-control.js')
-rw-r--r--web/js/010-control.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/web/js/010-control.js b/web/js/010-control.js
index 1c0478d..2975049 100644
--- a/web/js/010-control.js
+++ b/web/js/010-control.js
@@ -348,6 +348,18 @@ $(document).ready(function() {
}
return true;
});
+ $(document).mousewheel(function(event, delta) {
+ if (current_photo_cache == null)
+ return true;
+ if (delta < 0) {
+ window.location.href = $("#next").attr("href");
+ return false;
+ } else if (delta > 0) {
+ window.location.href = $("#back").attr("href");
+ return false;
+ }
+ return true;
+ });
$("#photo-box").mouseenter(function() {
$("#photo-links").stop().fadeTo("slow", 0.50).css("display", "inline");
});