-
-
Save tatat/4672744 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(document).on('mousedown', function mousedown_handler(e) { | |
var mousemove_handler = function(e) { | |
// 動かしたり | |
}; | |
$(this) | |
.on('mousemove', mousemove_handler) | |
.on('mouseup', function mouseup_handler(e) { | |
$(this) | |
.off('mousemove', mousemove_handler) | |
.off('mouseup', mouseup_handler); | |
}); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment