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 227 forks source link

Callback on click (not activate/deactivate) #108

Closed Dobby89 closed 8 years ago

Dobby89 commented 8 years ago

Is there a way to have a callback for when a tab is clicked (regardless of whether it's activated or deactivated)?

The activated callback is only run once when the tab becomes active

My requirements are that I need to know when a tab is clicked every time. The tab could be active or not-active, but I just need a callback.

In my implementation, one of the tabs activates a modal popup, but currently it only allows me to know its been clicked if it's being activated. I need to know it's been clicked even when the tab is already open.

jellekralt commented 8 years ago

There is no way out of the box to achieve this. I'm afraid the only way to do this is adding click handlers on the tabs yourself.

Dobby89 commented 8 years ago

I made a pull request for this if anyone else wants something similar.