Retrieving an element name?

Retrieving an element name?

Hi all,

Consider the following query code:

$("div#content p:has(strong)").each(function(){
   //for every match do something
});


Within div#content I'm matching every paragraph with a strong tag in it. What I'd like to do next is find out which tag it is that comes next to it. I know I can make a match using next() but how can I find out which element it actually is? So that I can put that in a var or use it for an if statement or something...

Anyone who can help out?