AnyLink CSS Menu overwrites existing onmouseout events (if any) for the elements that it is active on (activated by). There are many approaches one can take to overcome this depending upon just what you want to happen, and upon personal preference - as to approach (there are so many).
Here is where it (overwriting onmouseout) happens (from anylink.js - essential line highlighted red):
Code:
function dropdownmenu(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
showhide(dropmenuobj.style, e, "visible", "hidden")
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}
If all of your anylink drop downs swap images using the code from your post, you could change that red line to:
Code:
obj.onmouseout=function(){delayhidemenu();MM_swapImgRestore();};
and it should work out. If not, or if you need more help:
Please post a link to the page on your site that contains the problematic code so we can check it out.
Bookmarks