I have link that calls a function when clicked:
<a href="javascript:spawnMenu(this);" id="link1">Test1</a>
To make my function work, I need access to the object so that I can perform jQuery operations like this:
alert($(objCaller).offset().left);
Since objCaller
points to the object and not the object ID, this won't work. I need something like this:
alert($("a#link1").offset().left);
How can I get the object ID from objCaller
?