Hello i made a small javascript hover layer code that follows a mouse when over an image and it works perfectly fine on IE but is having problems working in firefox, if u can then can you please turn my code into a cross browser and in explaination either one will be very very helpfull thank you
a working example of this is found on http://wow.lod-gaming.net/meh.htmlCode:<script language="JavaScript1.2"> <!-- var IE = document.all?true:false if (!IE) document.captureEvents(Event.MOUSEMOVE) document.onmousemove = getMouseXY; var tempX = 0 var tempY = 0 function getMouseXY(e) { if (IE) { tempX = event.clientX + document.body.scrollLeft tempY = event.clientY + document.body.scrollTop } else { tempX = e.pageX tempY = e.pageY } if (tempX < 0){tempX = 0} if (tempY < 0){tempY = 0} return true } function showDiv(dname){ document.getElementById(dname).className="showDiv"; document.getElementById(dname).style.top=tempY; document.getElementById(dname).style.left=tempX+10; } function hideDiv(dname){ document.getElementById(dname).className="hideDiv"; } //--> </script>


Reply With Quote


Bookmarks