Configuration
You can create a tab set and pass it a few options to customize it to your current page structure. By default, the code will search for tabs by using the class name "tab", and tab content using the class name "panel". It also will apply the class name "selected" to the currently selected tab.
You may also have noticed that the id attributes for the tags and tag content started with either "tab_" or "panel_". This is a way to link a tab with its specific content while still keeping the ids unique. You can change these in the configuration as well.
Finally, if you wanted, you can turn off the fade effect, and also change the event that triggers the tab activation.
Below is an example of how you can pass options to your tab set.
var tabs = new tabset('container', {
classNames: {
tab: 'tab', // class name used to identify the tabs
panel: 'panel', // class name used to identify the tab content
tabActive: 'selected' // class name added to the active tab
},
ids: {
tab: 'tab_', // what to strip off the tab id to get the tab name
panel: 'panel_' // what to strip off the tab content id to get the tab name
},
onEvent: 'click', // perhaps you want to activate on mouseover? not recommended
effects: true // set this to false if you do not want to include effects.js
});