I am utilizing jScrollPane to create customized scrolls on a div that receives updated content through ajax with the .load() method in jQuery.
Initially, it works when the content is loaded into the div. However, after changing the contents, the div still has overflow: hidden, preventing jScrollPane from creating a scroll for the new content. I attempted removing the overflow attribute like so:
$('#content .text').css('overflow', 'auto');
$('#content .text').jScrollPane();
Unfortunately, this forces the content div to use the system scroll instead of the custom one. Next, I tried:
$('#content .text').css('overflow', 'none');
$('#content .text').jScrollPane();
This didn't seem to work at all. Then, I attempted to completely clear the attribute:
$('#content .text').css('overflow', '');
$('#content .text').jScrollPane();
Despite trying these different approaches, I still haven't been successful. Are there any other methods I can utilize?
- It's important to note that I cannot remove the entire style attribute as it is being used to dynamically set heights and widths for the div.
Thank you in advance.