Forum Moderators: not2easy

Message Too Old, No Replies

drop down menu - doesn't work for PC

works on my mac?

         

sldesigns

9:31 pm on Mar 27, 2006 (gmt 0)

10+ Year Member



Hello! Boy I hope someone can help me with this one.
I'm using a dropdown menu, css with a bit of javascript. Works in ff, ie, safari on my mac -- but I do have to have the code in the head of every page, cannot refer to a js file or mac ie won't work.

I got the script from some suckerfish derivative. Here's what my pcie using client says:"I especially like the drop down menus. However, they don't seem to work quite right. I move my mouse down the list and they disappear before I can click on anything. It seems to be more prevalent on the right side of the drop down list."

Does anyone have script that will work for certain on the pc, and at least mac ff? Don't really care about macie. This is the script I'm currently using:

<script type="text/javascript"><!--//--><![CDATA[//><!--
function menuFix() {
var sfEls = document.getElementById("navdrop").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
// event added to keep menu items from disappearing
sfEls[i].onMouseDown=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
// event added to keep menu items from disappearing
sfEls[i].onMouseUp=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp("(?¦^)sfhover\\b"), "");
}
}
}
window.onload=menuFix;
//--><!]]></script>

I don't know javascript, so can't tell if there's something funky with the code. Figured enough people here have done some dropdowns, someone will take pity on me!

BTW, there is only one level of dropdown.

sldesigns

8:33 pm on Mar 28, 2006 (gmt 0)

10+ Year Member



anyone? I've tried a lot of different scripts and can't get them to work. Anyone have one that works on a pc and occassionally on a mac?