var help = {} help.init = function(){ help.bind() } help.bind = function(){ $(window).on("scroll DOMMouseScroll mousewheel", function(){ scrolling = true }) $("#show-commands").click(function(){ $("#tutorial").hide(); $("#commands").toggle() }) $("#show-tutorial").click(function(){ $("#commands").hide(); $("#tutorial").toggle() }) $("#commands .close").click(function(){ $("#commands").toggle() }) $("#tutorial .close").click(function(){ $("#tutorial").toggle() }) $("#commands,#tutorial").draggable({ start: drag_start, stop: drag_stop }) $("#commands,#tutorial").disableSelection(); } function drag_start(){ dragging = true; $(this).addClass("dragging") } function drag_stop(){ dragging = false; $(".dragging").removeClass("dragging") } function status(s){ $(".status").html(s); console.log(s) } function quiet_status(s){ $(".status").html(s) }