Possible duplicate:
Can jQuery specify a tag name?
Hello!
This question is so basic that I am ashamed to ask, but I tried to find the answer within 30 minutes without any results.
How to find out which item was clicked in the code below.
$('*').click(function (event) { var this_element = $(this).???; return false; })
I am looking for the this_element variable to be set to 'a' if it is a link, 'p' if it is a paragraph 'div' if ...
Thanks!
jquery elementname
Marreone
source share