$(this).attr('tagName') or more simply, this.tagName.
On Nov 15, 9:27 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Let's say we have the following set up where doSomething is a function:
>
> $("h1, h2, h3").doSomething();
>
> How can one identify which tag is currently having
> $("h1, h2, h3").doSomething();
> How can one identify which tag is currently having something done to it?
Try the tagName property of the DOM element:
$("h1, h2, h3").each(function(){
alert(this.tagName);
});
2 matches
Mail list logo