I have some js that works fine in IE to create a growing div when I click on an element on my page. It grows right where the mouse was clicked as you can see with this:
Code: Select all
(horz == "e;left"e; ? th.left=event.clientX - 50 : th.left=event.clientX - 100);
(horz == "e;left"e; ? th.top=event.clientY - 60 : th.top=event.clientY);I found this:
Code: Select all
function addEvent(obj, evType, fn, useCapture){
if (obj.addEventListener){
obj.addEventListener(evType, fn, useCapture);
return true;
} else if (obj.attachEvent){
var r = obj.attachEvent("e;on"e;+evType, fn);
return r;
} else {
alert("e;Handler could not be attached"e;);
}
}basically I just need to detect whether it's ff or not (can alraedy to that on my own) and then provide the appropriate code to determine where on the page the mouse was clicked to start growing my div.
this is only my first hurdle but I wanna do this in baby-steps.
THANKS!
Burr
...yes aware I am it's yoda-speak day, but too lazy I was to write all of this up in yoda-speak and make sure you understood it all I did.