Answers for "how to check if an element starts with class in jquery"

0

how to check if an element starts with class in jquery

/*SM*/

//Try using :
$("[class^=info_]"); //Classes Starts with  info_
$('[class*=info_]');  // Classes which contains info_

//instead of hasClass
if($('label').is('[class*=info_]')){} //Contains
//or
 if($('label').is('[class^=info_]')){} //Starts with
Posted by: Guest on July-20-2021

Code answers related to "how to check if an element starts with class in jquery"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language