tags:

views:

32

answers:

1

hi,

i've just started using the jQuery Tabs plugin, and i'm wondering:

according to the demos, the sstab only works with unique IDs (for the container div and refering IDs for the panel-divs).

is there a way to avoid using unique IDs and using custom attributes instead? (eg. "tabName=myTab" -> "tabName=myTab-1")

i'm asking because i'd like to use the jQuery tabs within a cms environment which has several guis and makes it rather impossible using unique IDs.

thanks

+2  A: 

Well, if you look at the source, you'll see that the answer is sadly no - http://code.google.com/p/jquery-ui/source/browse/trunk/ui/jquery.ui.tabs.js#114 .

I'm not sure what you mean by "multiple GUIs", but you might want to consider having your tab panels and their associated anchors use IDs based off of some unique database ID.

<div>
    <ul>
        <li><a href="#tab-panel-1743-main">Main Content</a></li>
        <li><a href="#tab-panel-1743-secondary">Secondary Content</a></li>
    </ul>
    <div id="tab-panel-1743-main"></div>
    <div id="tab-panel-1743-secondary"></div>
</div>
BBonifield