Reputation: 336
I have the following jsFiddle: http://jsfiddle.net/tad604/dpRca/2/
That works as desired on IE and Chrome, when it comes to Firefox it doesn't work right.
The desired behavior is to have a div (with the word foo) created where ever you click on the div containing the image.
With firefox the top/left positioning information is lost.
Upvotes: 1
Views: 118
Reputation: 536675
"top":(ui.offsetY)+"px"
offsetX
/offsetY
(and the offsetParent
they are calculated relative to) are non-standard event properties not available in Firefox.
Use clientX
/clientY
(standard) or pageX
/pageY
(typically more useful; populated by jQuery from clientX/Y where not natively available) instead.
Upvotes: 1