cogiva — 2010-06-21T11:13:51-04:00 — #1
I am creating a pop up bubble for a rollover effect on a page. This works fine in all browsers except IE.
Here's the code....
var scrRoll = document.getElementById("scrollerRolloverText");
var el = document.getElementById("Technology");
top_value = el.y - 133;
scrRoll.style.top = top_value.toString() + "px";
scrRoll.style.left = el.x - 15 + "px";
scrRoll.innerHTML = item;
scrRoll.style.filter = "alpha(opacity=0);";
scrRoll.style.mozopacity = 0 / 100;
scrRoll.style.opacity = 0 / 100;
scrRoll.style.kthmlopacity = 0 / 100;
scrRoll.style.display = "block";
fader = setInterval(divFadeIn, 20);
The issue that I appear to be facing is that IE cannot access the x an y co-ords of the element "Technology" (set to el in the above code). Any idea why IE can't access this attribute and the other browsers can? Any alternatives?
cogiva — 2010-06-22T04:21:01-04:00 — #2
Thanks for the help guys. In the end I went with offsetX/offsetY (and a bit of maths magic) which appears is accessible by all current browsers.
felgall — 2010-06-21T22:09:17-04:00 — #3
paul_wilkins — 2010-06-21T18:53:19-04:00 — #4
Quirksmode has some good info on how to find an elements position