javascript - Getting the co-ordinates of an element -


this question has answer here:

how co-ordinates of element after onclick event ? need place overlay below icon clicked.

is there such built in function provided javascript rather manually writing function ?

in yui, use getxy() function returns absolute page position of object in dom. source function in yui2 here: http://developer.yahoo.com/yui/docs/dom.js.html.

in jquery, looks use .offset() method of jquery object: http://api.jquery.com/offset/.

you can either use 1 of or @ implementation , see how work code own.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -