CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 04 Aug 2025 04:15:23 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100406190538
location: https://web.archive.org/web/20100406190538/https://github.com/anutron/clientcide-tabswapper
server-timing: captures_list;dur=0.802832, exclusion.robots;dur=0.027174, exclusion.robots.policy;dur=0.012202, esindex;dur=0.012146, cdx.remote;dur=95.354637, LoadShardBlock;dur=277.417105, PetaboxLoader3.datanode;dur=86.727565, PetaboxLoader3.resolve;dur=149.183962
x-app-server: wwwb-app220
x-ts: 302
x-tr: 443
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app220; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 04 Aug 2025 04:15:24 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Tue, 06 Apr 2010 19:05:38 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "3dc7445ba81e526f04de1c9e15a041cc"
x-archive-orig-x-runtime: 128ms
x-archive-orig-content-length: 26656
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Tue, 06 Apr 2010 19:05:38 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 14 Dec 2009 13:45:56 GMT", ; rel="prev memento"; datetime="Mon, 01 Mar 2010 23:40:17 GMT", ; rel="memento"; datetime="Tue, 06 Apr 2010 19:05:38 GMT", ; rel="next memento"; datetime="Thu, 27 May 2010 22:46:44 GMT", ; rel="last memento"; datetime="Fri, 20 Nov 2020 06:51:12 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_15_20100406110248_crawl102-c/51_15_20100406190421_crawl101.arc.gz
server-timing: captures_list;dur=0.767762, exclusion.robots;dur=0.028927, exclusion.robots.policy;dur=0.013031, esindex;dur=0.012748, cdx.remote;dur=298.570942, LoadShardBlock;dur=589.414686, PetaboxLoader3.datanode;dur=531.697210, PetaboxLoader3.resolve;dur=342.166575, load_resource;dur=362.594206
x-app-server: wwwb-app220
x-ts: 200
x-tr: 1305
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
anutron's clientcide-tabswapper at master - GitHub
anutron / clientcide-tabswapper
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (1)
- Wiki (1)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage

Aaron Newton (author)
Tue Dec 08 21:37:16 -0800 2009
name | age | message | |
---|---|---|---|
![]() |
README.md | Tue Sep 01 11:20:09 -0700 2009 | updating requirements [Aaron Newton] |
![]() |
Source/ | Tue Dec 08 21:37:16 -0800 2009 | yaml header finalized [Aaron Newton] |
![]() |
package.yml | Mon Nov 30 18:35:12 -0800 2009 | new yaml headers [Aaron Newton] |
![]() |
screenshot.png | Tue Sep 01 10:49:31 -0700 2009 | adding screenshot [Aaron Newton] |
README.md
TabSwapper - a basic tabs widget
Handles the scripting for a common UI layout: the tabbed box. If you have a set of DOM elements that are going to toggle visibility based on the related tabs above them (they don't have to be above, but usually are) you can instantiate a TabSwapper and it's handled for you.
Requirements
- MooTools Core 1.2.3: Element.Event, Fx.Tween, Fx.Morph (and their dependencies)
- MooTools More 1.2.3.1: Element.Shortcuts, Element.Dimensions, Element.Measure (and their dependencies)
How to use
Syntax
new TabSwapper(options);
Arguments
- options - (options) a key/value set of options
Options
- selectedClass - (string) the css class for the tab when it is selected; defaults to 'tabSelected'
- deselectedClass - (string) the class for the tab when it isn't selected; defaults to empty string
- mouseoverClass - (string) the class for the tab when the user mouses over; defaults to 'tabOver'
- rearrangeDOM - (boolean) arranges the tabs and sections in the DOM to be in the same order as they are in the class; defaults to true.
- tabs - (array) a collection of DOM elements for the tabs (these get the above classes added to them when the user interacts with the interface); can also be a $$ selector (string).
- clickers - (array) a collection of DOM elements for the clickers; if your tab contains a child DOM element that the user clicks - not the whole tab but an element within it - to switch the content, pass in an array of them here. If you don't pass these in, the array of tabs is used instead (the default). Can also be a $$ selector (string).
- sections - (array) a collection of DOM elements for the sections (these change when the clickers are clicked); can also be a $$ selector (string).
- initPanel - (integer) the panel to show on init; defaults to 0 (zero)
- smooth - (boolean) use opacity effect to smooth transitions; defaults to false
- smoothSize - (boolean) smoothly resize the sections from one section to the other; false is default
- cookieName - (string) if defined (it isn't by default), the browser will remember the user's previous tab selection using a cookie
- cookieDays - (integer) how many days to remember the user's tab selection with the cookie; it's ignored if cookieName isn't set; defaults to 999
- effectOptions - (object) the options to pass on to the transition effect if the "smooth" option is set to true; defaults to {duration: 500}
Events
- onBackground - (function) callback executed when a section is hidden; passed three arguments: the index of the section (integer), the section (element), and the tab (element)
- onActive - (function) callback executed when a section is shown; passed three arguments: the index of the section (integer), the section (element), and the tab (element)
- onActiveAfterFx - (function) callback executed when a section is shown but after the effects have completed (so it's visible to the user); passed three arguments: the index of the section (integer), the section (element), and the tab (element)
Example
<ul id="myTabs">
<li><a href="1">one</a></li>
<li><a href="2">two</a></li>
<li><a href="3">three</a></li>
</ul>
<div id="myContent">
<div>content 1</div>
<div>content 2</div>
<div>content 3</div>
</div>
var myTabSwapper = new TabSwapper({
selectedClass: 'on',
deselectedClass: 'off',
mouseoverClass: 'over',
mouseoutClass: 'out',
tabs: $$('#myTabs li'),
clickers: $$('#myTabs li a'),
sections: $$('#myContent div'),
smooth: true,
cookieName: 'rememberMe'
});
Notes
- you don't have to specify the classes for mouseover/out
- you don't have to specify a click selector; it'll just use the tab DOM elements if you don't give it the click selector
- the click selector is NOT a subselector of the tabs; be sure to specify a full css selector for these
- you can initialize the class without any tabs or sections and add them subsequently with addTab
TabSwapper Method: addTab {#TabSwapper:addTab}
Adds a tab to the interface.
Syntax
myTabSwapper.addTab(tab, section[, clicker, index]);
Arguments
- tab - (mixed) A string of the id for an Element or an Element reference to the tab
- section - (mixed) A string of the id for an Element or an Element reference to display when the element clicks to change tabs
- clicker - (mixed, optional) A string of the id for an Element or an Element reference to the element (typically within the tab) that the user clicks to switch tabs
- index - (integer, optional) where to insert this tab; defaults to the last place (i.e. push)
Returns
- (object) This instance of TabSwapper
TabSwapper Method: removeTab {#TabSwapper:removeTab}
Removes a tab from the TabSwapper; does NOT remove the DOM elements for the tab or section from the DOM.
Syntax
myTabSwapper.removeTab(index)
Arguments
- index - (integer) the index of the tab to remove.
Returns
- (object) This instance of TabSwapper
TabSwapper Method: moveTab {#TabSwapper:moveTab}
Moves a tab from one location to another (ie it changes its index).
Syntax
myTabSwapper.moveTab(from, to);
Arguments
- from - (integer) the index of the tab to move
- to - (integer) its new location
Returns
- (object) This instance of TabSwapper
TabSwapper Method: show {#TabSwapper:show}
Shows a given section (as if the user clicked the tab).
Syntax
myTabSwapper.show(index);
Arguments
- index - (integer) the index of the tab to show
Returns
- (object) This instance of TabSwapper