vdw / Tabslet

Yet another jQuery plugin for tabs, lightweight, easy to use, mobile-friendly and with some extra features.
http://vdw.github.io/Tabslet/
Apache License 2.0
564 stars 110 forks source link

Navigation: Use Select or Methods #27

Closed flowdee closed 9 years ago

flowdee commented 9 years ago

For mobile devices i would like to use a select instead of a ul list to navigate the tabs.

As far as I can see right now it's not possible to use select instead of a ul list for navigation, correct? Would it be possible to add support for select fields as well? Otherwise it would be very helpful to have some small functions we can call to change the active tab.

vdw commented 9 years ago

You can use the following two methods from the latest version 1.6.2:

"next" to go to the next tab or "prev" to go to the previous tab

e.g.:

$('.tabs').trigger('next');
flowdee commented 9 years ago

Mh the best case would be when I can create a select field and the select will trigger the tab.

next/prev is fine, but a select would not work with it cause it need something like "goTo".

vdw commented 9 years ago

You can trigger the method "show" from version 1.7.0 on the change of the select-field. Note: you have to pass a parameter, the tab's identifier.

e.g.:

$('.tabs').trigger('show', '#tab-3');
flowdee commented 9 years ago

Thanks for your nice work :+1: