开发者

How to have jQuery tabs with (partially) shared contents?

I've got a web site where four different kinds of data are shown, based on the tab selected below them.

Some of the tabs need shared controls. Sliders and the like. I don't want to duplicate them on multiple tabs, because that would require syncing also their runtime status all the time.

I presume I must make my own implemen开发者_运维技巧tation for such a "tabs with shared contents". Anyone already had this need (and possibly solved it)?


Make Your own simple tabbing solution (3 upto 10 lines of code I suppose) [or find one that supports classes the way You need]

Instead of putting content in divs called tab1, tab2 etc. use paragraphs and give them classes that refer to content. Then make Your tabs solution show paragraphs with classes associated with the tab

Or in a simpler case - make tabs show onlu paragraphs that have a class tabX and give multiple classes to some paragraphs.

done.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜