I found a code sample on this forum that worked. I will post below in case someone else needs it. I found it in the following thread (Thank You SO MUCH to this person for having such a helpfull posting!!
): http://www.dynamicdrive.com/forums/a...p/t-12908.html
Code:
var initialiseMenu = function() {
var menus = [];
function setClass() {
if (!/(^|\s)over(\s|$)/.test(this.className))
this.className += ' over';
}
function removeClass() {
this.className = this.className.replace(/(^|\s)over(\s|$)/, ' ');
}
window.attachEvent('onunload', function() {
for (var i = 0; i < menus.length; ++i)
menus[i].onmouseover = menus[i].onmouseout
= null;
menus.length = 0;
window.detachEvent('onunload', arguments.callee);
});
return function(id) {
var menu = document.getElementById(id),
nodes = menu.childNodes;
for (var index = 0, length = nodes.length, node; index < length; ++index) {
node = nodes[index];
if (node.tagName == 'LI') {
node.onmouseover = setClass;
node.onmouseout = removeClass;
}
}
menus[menus.length] = menu;
};
}();
window.attachEvent('onload', function() {
initialiseMenu('menu1'); //Change to style used for drop downs
initialiseMenu('menu2'); //Change to style used for drop downs
window.detachEvent('onload', arguments.callee);
});
Bookmarks