avireni
4/13/2012 - 11:13 PM

Check If An Element contains a certain class or element

Check If An Element contains a certain class or element


//jQuery 1.4.* includes support for the has method. This method will find
 //if a an element contains a certain other element class or whatever it is
 //you are looking for and do anything you want to them.
 
$("input").has(".email").addClass("email_icon");