Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Javascript :: js hide div 
Javascript :: is checked checkbox jquery 
Javascript :: python pretty print json command line 
Javascript :: how to scrape the web with javascript 
Javascript :: or operator in javascript 
Javascript :: resize function in addEventListener JS 
Javascript :: js platformer 
Javascript :: nodejs emit event from class 
Javascript :: how can ic get the id of div jq 
Javascript :: switch in react 
Javascript :: last index of javascript 
Javascript :: how to render react native app under the status bar 
Javascript :: javascript convert file to array 
Javascript :: add parameter to serialize javascript 
Javascript :: how to randomize an array 
Javascript :: adding js file to reactjs 
Javascript :: how to increment counter button click in javascript 
Javascript :: jquery document ready function 
Javascript :: how to make back button react 
Javascript :: find even numbers in an array javascript 
Javascript :: loop through an array in js 
Javascript :: select in react with nchange 
Javascript :: react uselazyquery and usequery 
Javascript :: js if dark mode 
Javascript :: jquery equivalent of document.getelementbyid 
Javascript :: ts node cannot use import statement outside a module 
Javascript :: moment get day 
Javascript :: javascript auto scroll a page to top 
Javascript :: how the filter() function works javascript 
Javascript :: javascript code to calculate compound interest 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =