Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Need Help Finding Top and Left Location of an Element When Clicked

$
0
0

Hi! I am working on a project with several nested DIVs, and I would like to be able to get the top and left coordinates of a DIV when I click on it, relative to the Stage.

 

I used this code in the On Click action for the DIV:

 

var objTop = sym.$(e.currentTarget).css("top");

var objLeft = sym.$(e.currentTarget).css("left");

 

But, since this is a nested DIV, it seems to be giving me the coordinates relative to the parent, not the Stage. Any help you can provide will be greatly appreciated!

 

Thanks and Happy Thanksgiving!

 

Fred


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>