1element.is('.class1, .class2')
2// works, but it's 35% slower than
3
4element.hasClass('class1') || element.hasClass('class2')
5
6//https://stackoverflow.com/questions/2214952/jquery-hasclass-check-for-more-than-one-class
1jQuery('button').click(function(){
2
3 var hcls =jQuery('p').hasClass('class2').addClass('class2');
4
5 if(hcls == true){
6
7 alert('Yuor class is remove ');
8 }
9 else{
10
11 alert('your class is nnot remove');
12 }
13
14 });