开发者

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

开发者_C百科

Thanks


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜