From 9433b20670a1eada77e1a4372a8f8ccad6f499c3 Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 25 Jan 2014 23:24:36 -0500 Subject: split out help and whatever else --- js/help.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 js/help.js (limited to 'js/help.js') diff --git a/js/help.js b/js/help.js new file mode 100644 index 0000000..5610794 --- /dev/null +++ b/js/help.js @@ -0,0 +1,19 @@ + +var help = {} + +help.init = function(){ + help.bind() +} + +help.bind = function(){ + $(window).on("scroll DOMMouseScroll mousewheel", function(){ scrolling = true }) + $("#help,#instructions .close").click(function(){ $("#instructions").toggle() }) + $("#instructions").draggable({ + start: drag_start, + stop: drag_stop + }) + $("#instructions").disableSelection(); +} + +function drag_start(){ dragging = true; $(this).addClass("dragging") } +function drag_stop(){ dragging = false; $(".dragging").removeClass("dragging") } -- cgit v1.2.3-70-g09d2