jQuery – How to check if element has any of these classes September 9, 2023 by Tarik You could use the jQuery is function, checking all the classes that you want match. $("#test").is(".a1,.a2,.a3,.a4,.a5")