1 Reply Latest reply on Dec 2, 2013 2:48 PM by heathrowe

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

    Fred Tacon Level 1

      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!