I have multiple div in the page, I assign script perfectScrollbar,. It seems to be work, it can render graphic scrollbar, but it cannot scroll up/down inside each boxes...
How do I resolve it ?
OK, I found solution at http://stackoverflow.com/questions/23565393/add-multiple-scrollbar-in-a-same-page-using-perfect-scrollbar-plugin to using each() function on jQuery
$('.contentHolder').each(function(){
$(this).prefectScrollbar();
});
Just curious, but does $('.contentHolder').prefectScrollbar(); not work for you?
It should work without each, as @mhulse said, because the plugin call the each internally. Which version are you using?
I'm using version 0.5.4, but actually I combine it in another jQuery scripts, so It may conflict somehow
Doesn't seem like a perfectScrollbar issue to me, but maybe more how your other jQuery scripts work. Could you maybe share a reproducible example?
Closed, as it seems resolved for the time being.
Cheers,
Just in case anyone stumbles over this question with the newer version of this plugin - this is a working example:
$('.dialogInner').each(function(){
const ps = new PerfectScrollbar($(this)[0]);
});
Ich bin von Di, 09.01.2018 bis Mi, 21.02.2018 abwesend.
Hinweis: Dies ist eine automatische Antwort auf Ihre Nachricht "Re:
[utatti/perfect-scrollbar] Can I use multiple perfectScrollbar on same
page? (#246)" gesendet am 11.01.2018 13:22:28.
Diese ist die einzige Benachrichtigung, die Sie empfangen werden, w盲hrend
diese Person abwesend ist.
www.biotronik.com
BIOTRONIK - excellence for life
BIOTRONIK SE & Co. KG
Woermannkehre 1, 12359 Berlin, Germany
Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRA 6501
Vertreten durch ihre Komplement盲rin:
BIOTRONIK MT SE
Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRB 118866 B
Gesch盲ftsf眉hrende Direktoren: Dr. Daniel B眉hler, Dr. Lothar Krings, Dr. Ralf Lieb, Thomas Simmerer
This e-mail and the information it contains including attachments are confidential and meant only for use by the intended recipient(s); disclosure or copying is strictly prohibited. If you are not addressed, but in the possession of this e-mail, please notify the sender immediately and delete the document.
@StSenf Thank you so much brother that works for me.
@StSenf how would I add the new PerfectScrollbar object to $(this) so I can access it later and perform an ps.update() when the scroll area content changes?
I tried $(this).ps = new PerfectScrollbar(...) but that does not work =/
@StSenf
thank's!!!
Most helpful comment
Just in case anyone stumbles over this question with the newer version of this plugin - this is a working example:
$('.dialogInner').each(function(){ const ps = new PerfectScrollbar($(this)[0]); });