jellekralt / Responsive-Tabs

Responsive Tabs is a jQuery plugin that provides responsive tab functionality. The tabs transform to an accordion when it reaches a CSS breakpoint. You can use this plugin as a solution for displaying tabs elegantly on desktop, tablet and mobile.
http://jellekralt.github.io/Responsive-Tabs/
MIT License
531 stars 228 forks source link

scrollToAccordion fires on page load instead of click #92

Closed leptest closed 8 years ago

leptest commented 8 years ago

The scrollToAccordion option fires on page load instead of when it's clicked.

I'm not sure if this is expected behaviour but i can see it causing issues if there are multiple accordions on the page at load time. How will it know which one to scroll to?

I can put together a codepen if you want, but it seems self explanatory.

Cheers, Daniel

jellekralt commented 8 years ago

Hi,

This was indeed the case. I've added a new option to disable this case. I've intentionally left it enabled because it is used by some people as a feature, rather than a bug. If you get the latest version (v1.6.0) and set scrollToAccordionOnLoad: false this should be solved for you.

leptest commented 8 years ago

Great!

Thank you!