1if ($('html').is('.m320, .m768')) { ... }
2//https://stackoverflow.com/questions/10559153/jquery-hasclass-for-multiple-values-in-an-if-statement
3
1var $html = $("html");
2
3if ($html.hasClass('m320') || $html.hasClass('m768')) {
4
5 // do stuff
6 // https://stackoverflow.com/questions/10559153/jquery-hasclass-for-multiple-values-in-an-if-statement
7
8}
9
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 });