getPosition | JavaScriptSource

getPosition

JavaScriptSource Staff Aug 29, 2005
When a layer is inside another layer, it's style.left and style.top positions can both be '0' but the layer itself can be 500 pixels away from the actual margin. These functions will return the true offset.

The JavaScript Source: Snippets: getPosition

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

(
0 comments)