jScrollPane autoReinitialise

339 views Asked by At

I'm struggling with reinitialise jScrollPane when content changes or is shown/hidden. Here's my page (I use jScrollPane only for Firefox) and here's my code (see functions hideFooterSection and showFooterSection)

Basically if you click on "Disclaimer" the footer will expand and scrollPane is correctly working; if you click somewhere else and then you go back to disclaimer, no scrollbars are shown. I tried to destroy or renitialise the jScrollPane when the footer is collapsed but no way...any help?

2

There are 2 answers

0
Mahesh On

Reiniate jScrollPane as follow when any changes ooccur:

$('.Your Element Class').jScrollPane({
    verticalGutter :4,
    autoReinitialise :true, 
    contentWidth: '0px' ,
    autoReinitialiseDelay: 20
});

OR

$('#Your Element ID').jScrollPane({
    verticalGutter :4,
    autoReinitialise :true, 
    contentWidth: '0px' ,
    autoReinitialiseDelay: 20
});
0
Dario On

I finally used perfect-scrollbar plugin; it has been very easy to configure it and make it work.