[jQuery] Re: Identifying the tag

2008-11-15 Thread donb
$(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

[jQuery] Re: Identifying the tag

2008-11-15 Thread Dave Methvin
> $("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); });