Jump to content

window.moveBy method: problem with Opera ?


GBS

Recommended Posts

I've fixed that one,,
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
if (browser.isIE) // IE & not supported by Opera
{
x = window.event.clientX + document.documentElement.scrollLeft+ document.body.scrollLeft;
y = window.event.clientY + document.documentElement.scrollTop+ document.body.scrollTop;
}
else // some other browsers
{
x = event.clientX + [b]window.scrollX[/b]; // not supported too by Opera
y = event.clientY + [b]window.scrollY[/b];
}
[/quote]
At this point & using Opera, x & y values are still not numbers value,... lines needed:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
// lines to add for Opera:
if (isNaN(x)) // opera
{
x= event.clientX;
y= event.clientY;
}
[/quote]
& window.moveBy now works with Opera,, :)

solved,,

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.