Download presentation
Presentation is loading. Please wait.
1
Source: http://www.barelyfitz.com/pr ojects/tabber/ http://www.barelyfitz.com/pr ojects/tabber/
2
1. Create a div with class=“tabber” 2. Within that div, create any number of divs with class=“tabbertab”. Tabs names can be given using the “title” attribute of the div tag, or can be in h2, h3, …, h6. 3. Connect to tabber.js, provided from the web site. (Code can be customized for your needs. Makes calls automatically when linked.) 4. Style the results list as tabs. (Can use the style sheet provided on the website, example.css)
3
1. When page is loaded, tabber.js script runs to convert your plain HTML into dynamic HTML. 2. The dynamic HTML uses an unordered list for tabs.
4
BeforeAfter Section One Section one content. Section two content. <a href="javascript:void(null)“ onclick=""> Section One <a href="javascript:void(null)" onclick=""> MyTabTitle Section One Section one content. Section two content.
5
tabberObj div classMain classMainLive classTab classTabDefault classNav classTabHide classNavActive titleElements titleElementsStripHTML removeTitle addLinkId linkIdFormat REclassMain REclassMainLive … init() navClick() tabHideAll() tabHide() tabShow() navSetActive() navClarActive()
6
createElement() – creates the specified HTML element in an HTML document var element = document.createElement(tagName); element is the created element object tagName is a string that specifies the type of element to be created
7
insertBefore() – inserts a new child node before an existing child node. elementNode.insertBefore(new_node,existing_node) new-node – the node to insert Existing_node – the existing node. The new node is inserted before this node.
8
innerHTML sets or returns the inner HTML of an element. function changeLink() { document.getElementById('myAnchor').innerHTML="W3Schools"; document.getElementById('myAnchor').href="http://www.w3schools.com" ; document.getElementById('myAnchor').target="_blank"; } Microsoft
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.