Support » Plugin: Standard Widget Extensions » Faster Accordion?
Faster Accordion?
-
Hey, this plugin is great so far, but I’m wondering if there is a way to make the accordion collapse/expand faster? It’s a bit slow for what I’d like at the moment.
Thanks!
-
Thank you for using the plugin.
Though I’ll consider if I could make it as a regular option, you can make the animation faster if you could modify a JavaScript file. Because it’s not difficult, it’s worth a try even if you are not a programmer.
- In the ‘Standard WE’ options page, set the ‘Readable .js File’ option to ‘Enable’.
- In the ‘Installed Plugins’ page, click the ‘Edit’ link of Standard WE.
- Then choose standard-widget-extensions.js and modify it as follows (just adding three ‘200’s).
if (c) { if (c.is(":hidden")) { if (swe.single_expansion) { - $(".hm-swe-accordion-head").not(this).next().slideUp(); + $(".hm-swe-accordion-head").not(this).next().slideUp(200); if (swe.heading_marker) { $(".hm-swe-accordion-head").not(this).css('background', swe.buttonplusurl + " no-repeat left center"); } } - c.slideDown(set_widget_status); + c.slideDown(200, set_widget_status); if (swe.heading_marker) { $(this).css('background', swe.buttonminusurl + " no-repeat left center");
} else { - c.slideUp(set_widget_status); + c.slideUp(200, set_widget_status); if (swe.heading_marker) { $(this).css('background', swe.buttonplusurl + " no-repeat left center"); }
Don’t forget to save it. Now jQuery slideUp()/slideDown() functions are called with duration parameters. You can also set a value other than 200. Lower numbers are faster. Enjoy!
I’ve made the ‘Slide Duration’ option in the version 1.2 to define the animation speed. And I’d like to mark this topic as resolved.
- The topic ‘Faster Accordion?’ is closed to new replies.