I dynamically add content to my jScrollPane DIV, and finally I increased its height or got rid of it, depending on the amount of content, however I need that in this case I do not need to scroll back to the top every time that it is added or called. I need him to stay.
Here is the code I'm using to reinitialize jScrollPane at the moment:
function refreshNav() { var top = $('#my_scroller').css('top'); $('#infohome').jScrollPaneRemove(); if (page == "enquiryform"){ $('#infohome').css('height','550px') } else { $('#infohome').css('height','284px') } $('#infohome').jScrollPane(); $('#infohome').css('top',top); $('.jScrollPane').css('height','100%'); }
I already tried to get rid of all the code related to "top", but that does not seem to matter.
source share