Open

ROI Media Works Corp.
#104 - 970 McMaster Way Kamloops, BC
1-778-471-5953
call
1-778-471-5953
email

Tag: offsetx

offsetX/Y in Firefox

Just a gentle reminder that Mozilla Firefox doesn’t seem to support the offsetX and offsetY values for mouse events. If you find yourself wanting that value in Firefox, a suitable replacement is to subtract the targeted element’s offsetTop/Left from pageX/Y, which will give you the same value as offsetX/Y would give you.

Here is an easy function for jQuery users, which will add offsetX/Y to your existing event variable.

Read more »

Google+
No Comments Yet  |  Posted in: Web Development , , ,