jquery.nicescroll
jquery.nicescroll copied to clipboard
niceScroll not working with various accordion styled contents
I really like the new version of niceScroll and the iFrame helper is truly fixing the problems I had with an iframe on my band's web page.
But now I ran into the next problem ...
I have updated large parts of our site "under the hood" and have consequently replaced a few jquery plugins, one of which is niceScroll.
Since the update jQuery is no longer working on the two pages with accordion style content:
- http://www.thursday-evening-band.de/gigs/index.php?lang=EN
- http://www.thursday-evening-band.de/media/index.php?lang=EN
I'm pulling my hair out what the issue could be. By the way: for testing purposes I have used two different accordion plug-ins on both pages, but without success.
I'd be grateful for any hint!
Just wanted to add that the plugins used on both sites seem to use the jQuery UI accordion plugin as basis.
Hi, Looked at your site. Sorry to say so, but it is a real mess. You are using various versions of jQuery on different pages. I would start with trying version 2 instead of 3, because 3 doesn't work on a lot of older scripts. But I see the accordion open and close?
t in Geilenkirchen at the moment for a company there.
Regards, David my website: https://www.allmedialab.nl
Did you solved your problem? If so, may I know how you did it? This is my exact problem in my wordpress site
Link: http://swosh.com.ph/faqs/
When you open all of the accordion the nicescroll is not changing.
Hi,
yes, solved it!
You need to catch all events, which dynamically change the page height, and let them execute the "resize" method of niceScroll.
Here's an example:
$('.accordionbutton').click( function(e){ setTimeout(function(){ $('html, body').getNiceScroll().resize() }, 600) } );
On our media page there's a vertical content accordion and each time you click on one of the headlines (class "accordionbutton") the height of the page is changing, because one content area opens and the other one closes.
Since the accordion is set to expand/close with an animation of 500ms I have used a timer of 600ms to give enough time for the new page height to be settled.
Best regards,
Georg
PS: Since I am working with RapidWeaver the class name is in reality somewhat longer. I have shortened it for the example.
Gesendet: Dienstag, 12. Dezember 2017 um 07:08 Uhr Von: "Yinkci Heart" [email protected] An: "inuyaksa/jquery.nicescroll" [email protected] Cc: Jeeosch [email protected], Author [email protected] Betreff: Re: [inuyaksa/jquery.nicescroll] niceScroll not working with various accordion styled contents (#727)
Did you solved your problem? If so, may I know how you did it? This is my exact problem in my wordpress site
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
setTimeout(function(){ $('html, body').getNiceScroll().resize() }, 600)
this is rock, and still working for today. saved my day
Hi, yes, solved it! You need to catch all events, which dynamically change the page height, and let them execute the "resize" method of niceScroll. Here's an example: $('.accordionbutton').click( function(e){ setTimeout(function(){ $('html, body').getNiceScroll().resize() }, 600) } ); On our media page there's a vertical content accordion and each time you click on one of the headlines (class "accordionbutton") the height of the page is changing, because one content area opens and the other one closes. Since the accordion is set to expand/close with an animation of 500ms I have used a timer of 600ms to give enough time for the new page height to be settled. Best regards, Georg PS: Since I am working with RapidWeaver the class name is in reality somewhat longer. I have shortened it for the example.
You can also try these methods on stackoverflow. Both work perfectly and it's for all.
https://stackoverflow.com/questions/11862656/jquery-nice-scroll-not-working/11876895