easyrider
easyrider

Reputation: 701

How to activate tab when other tab is selected?

I'd like to open tab 3 when category 2 is selected and open tab 1 when category 1 is selected

Does anybody knows how to do it?

Here are the tabs

Thanks

Upvotes: 0

Views: 194

Answers (1)

Andrew Jackman
Andrew Jackman

Reputation: 13966

try adding $('a [href="#tabs-403"]').click( function () { $('a [href="#tab3"]').click(); } ); to your $.ready() function.

Also, it would be easier to do this if you gave ids to the tabs, since the only identifiers between them at the moment is the href attribute

note: for anyone who didn't view the source on his example $('a [href="#tabs-403"]') selects the category 2 tab

Upvotes: 1

Related Questions