Created
July 11, 2014 23:31
-
-
Save aradnom/791763a3177e7db85110 to your computer and use it in GitHub Desktop.
jScrollPane is a neato custom scrollbar plugin, but it won't unbind drag mouseup events correctly within a Google Maps container (it binds these events to html and the unbind never fires). The following resolves this.
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
$('.jscrollpane__container').jScrollPane().bind( 'mouseup.jsp', function () { | |
$('html').unbind('dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp'); | |
// This will remove the active class from ALL windows, so keep that in mind | |
// if that isn't the desired behavior. | |
$('.jspActive').removeClass( 'jspActive' ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment