Can jQuery provide the tag name? August 10, 2022 by Tarik You could try this: if($(this).is('h1')){ doStuff(); } See the docs for more on is().