JScrollPane dynamic content

I tried using the following jquery plugin: http://jscrollpane.kelvinluck.com/dynamic_content.html
but I still don't have time when I try to reinitialize the API

I have a div (id = content) that receives a response from the load () (jquery) method, in the end I use $ ('# content) .jScrollPane () again to update the scroll bar, but without success = \

Can someone help me? thanks!

+6
source share
2 answers

Quick google gives the following from

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

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

It works well ......

+12
source

... and if you want to update all scrollbars on your site, use this:

 function refreshPane() { var pane = $('YOUR SELECTOR').each(function(){ var api = $(this).data('jsp'); api.reinitialise(); }); } 
+4
source

Source: https://habr.com/ru/post/886485/


All Articles