position - jQuery's pageY in IE9+ when scrolled -


i've been trying mouse's position relative element, 1 of microsoft's lovely failures (or jquery's, knows?) popped up.

when page scrolled, jquery's pagey right , whatsoever on chrome, firefox, , ie8 (well, expect it's right behavior?). however, on ie9 , up, pagey relative users visible top.
... i'm bad @ explaining things. take @ this. @ first example, compare behavior between firefox/chrome/safari/opera , ie9+; positions won't same (at least aren't same in case).

a simplified version of code in case it's needed, doubt it's helpful or in case:

$("#element").click(function (e) {     var pos = $(this).offset();     console.log(e.pagex - pos.left, e.pagey - pos.top); } 

it might me missing gigantic there, it's been bugging me hours now. there way fix behavior in way?

thanks in advance!

try pageyoffset & pagexoffset. also, don't bind .pagexoffset event, element - $(window).pagexoffset


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -