Tuesday, May 18, 2010

jQuery plugin for a styled scrollbar

jScrollPane from kelvinluck.com
When combined with an accordion plugin or anything that sets the scrollpane to display:none, the scroller gets initialized to height:0, so you don't see anything. Workaround is to wrap the jScrollPane with show and hide like this:
$('#myDiv').show().jScrollPane().hide();
Another way I found is to add it to the click handler for the accordion tab, like so:
$('a.myTab').click(function() {
$('#myScrollWrap').jScrollPane();
});
(discussion of the issue and workaround here)

No comments:

Post a Comment