$30.00 Jackson Electronics Printers
- From Computer-Science: Programming-Methods
- Closed, but you can still post tutorials
- Due on Dec. 23, 2010
- Asked on Dec. 20, 2010 at 12:37:20AM
The object is to create a tabbed menu at the top of a web page that will direct users to the main sections of the web site.
Reposted and includes all files.Most of the work is done. Just need the following:
1.In the top of the jemenus.js file, create two global variables.
- The first currentTab, will reference the current menu tab being displayed on the page. Set its initial value to null.
- The second variable, maxZ, will store the z-index of the currently displayed tab. Set its initial value to 1.
2. Add an event handler to run the setTabs() function after the page loads.
3. Create the setTabs() function. The purpose of this function is to create an array of all menu tabs in the document and to initialize the value of the currentTab object. Within the function, do the following:
a. Declare an empty array named menuTabs.
b. Use the getElementsByTagName() method to store all of the elements in the document in an array named allElems.
c. Loop through the elements in the allElems array, pushing all of the elements belonging to the tab class into the menuTabs array.
d. Set the currentTab object equal to the first item in the menuTabs array.
e. For every item in the menuTabs array, add an onclick event handler that runs the showTab function.
- This tutorial was purchased 8 times and rated A+ by students like you.
- Posted on Dec. 20, 2010 at 01:46:28AM
