Sub class of DLSupportJS providing support for the tabs.
| DLSupportJS.Tab | Sub class of DLSupportJS providing support for the tabs. |
| Variables | |
| Contents | (array) An array of contents. |
| ContentWrapper | (object) The wrapper element for the contents. |
| CurrentlyOpenTab | (object) The currently opened tab. |
| Tabs | (array) An array of tabs. |
| TabWrapper | (object) The wrapper element for the tabs. |
| Functions | |
| initialize | Initialize the script. |
| addEvents | Add events to the given tab. |
| addTab | Add in a new tab with the given ID. |
| getId | Get the true ID of the given data. |
| loadPage | Load the page of the given object. |
| removeTab | Remove the given tab and its contents. |
| showTab | Show the given tab while hiding all the other tabs. |
initialize: function( tab, tabs, contents )
Initialize the script.
| tab | (string) The ID or the object that should be the currently opened tab. Note that this should not include the wrapper ID. |
| tabs | (mixed) The ID or the object that is the wrapper for the tabs. |
| contents | (mixed) The ID or the object that is the wrapper for the contents. |
addTab: function( id, name, data )
Add in a new tab with the given ID. If the ID already exist, this will just show that tab.
| id | (string) The ID of the tab. |
| name | (string) The title of the tab. |
| data | (string) The data for the content of the tab. |
| options | (object) An object containing various options used by this method. Defaults to an empty object. |
| link | (boolean) If this is true, then the given “data” should be the URL for which the content should be retrieved. Defaults to false. |
| once | (boolean) If this is true and if link is true, then the content will only be fetched one time. Defaults to false. |
removeTab: function( tab )
Remove the given tab and its contents.
Note that if the tab to be removed is the currently opened tab, the new currently opened tab will be the first tab in the tabs list.
| tab | (string) The ID of the tab to remove. Note that this should not include the wrapper ID. |
Initialize the script.
initialize: function( tab, tabs, contents )
Add events to the given tab.
addEvents: function( tab )
Add in a new tab with the given ID.
addTab: function( id, name, data )
Get the true ID of the given data.
getId: function( data )
Load the page of the given object.
loadPage: function( obj )
Remove the given tab and its contents.
removeTab: function( tab )
Show the given tab while hiding all the other tabs.
showTab: function( tab )