PDA

View Full Version : To change from mouse-click to mouse-hover on SlashDot menu script *please*



kevinhannan
08-28-2010, 12:25 PM
1) Script Title:
:: Slashdot Menu

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/slashdot.htm

3) Describe problem:

I am revamping my website for disabled people and the Slashdot menu is nearly perfect for my visitors.
With some of them having limited mobility, it would be better to have the menu expand and contract etc
on mouse hover as opposed to mouse click.

Unfortunately I do not know how to do this. Is there someone who knows how to change this to mouse-hover, *please*?
Being on Incapacity Benefits myself I cannot offer payment, but I can offer you webspace on my hosting account
if that is of interest to you.

Many thanks for reading me; I appreciate any help you can offer.

Kevin

vwphillips
08-28-2010, 01:09 PM
you could mak the change in RED but its not that easey to use


SDMenu.prototype.init = function() {
var mainInstance = this;
for (var i = 0; i < this.submenus.length; i++)
this.submenus[i].getElementsByTagName("span")[0].onmouseover = function() {
mainInstance.toggleMenu(this.parentNode);
};
if (this.markCurrent) {
var links = this.menu.getElementsByTagName("a");
for (var i = 0; i < links.length; i++)
if (links[i].href == document.location.href) {
links[i].className = "current";
break;
}
}
if (this.remember) {
var regex = new RegExp("sdmenu_" + encodeURIComponent(this.menu.id) + "=([01]+)");
var match = regex.exec(document.cookie);
if (match) {
var states = match[1].split("");
for (var i = 0; i < states.length; i++)
this.submenus[i].className = (states[i] == 0 ? "collapsed" : "");
}
}
};

kevinhannan
08-28-2010, 09:22 PM
thank you enormously for your help.
I really do appreciate it very much.