Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jQuery #check #class
ADD COMMENT
Topic
Name
2+9 =