Skip to content

Instantly share code, notes, and snippets.

@aradnom
Created July 11, 2014 23:31
Show Gist options
  • Save aradnom/791763a3177e7db85110 to your computer and use it in GitHub Desktop.
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.
$('.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