jScrollPane dynamic content

davi picture davi · Apr 22, 2011 · Viewed 11.9k times · Source

i was trying to use the follow jquery plugin: http://jscrollpane.kelvinluck.com/dynamic_content.html
but i'm still no success when i try to reinitialize the API

I have a div (id=content) which receives the response from load() method (jquery), after all, I use $('#content).jScrollPane() again to refresh the scrollbar, but no success =\

can any one help me? thanks!

Answer

pixelvoid picture pixelvoid · Nov 7, 2011

A quick google yields the following from

http://jscrollpane.kelvinluck.com/dynamic_content.html

function refreshNav() {
    var pane = $('YOUR SELECTOR');
    var api = pane.data('jsp');
    api.reinitialise();
}

Works very well......