Answers for "if object has both class jquery"

CSS
6

detect if an element has a class jQurey

$("#EL_ID").hasClass("CLASS_NAME");
Posted by: Guest on May-14-2020
0

jQuery hasClass() - check for more than one class

element.is('.class1, .class2')
// works, but it's 35% slower than

element.hasClass('class1') || element.hasClass('class2')

//https://stackoverflow.com/questions/2214952/jquery-hasclass-check-for-more-than-one-class
Posted by: Guest on November-26-2020

Browse Popular Code Answers by Language