I have this code:
if(($('#1M').attr('class') == 'btn active')){ ...code here... }
Either if the class is the same or not, it enter the IF.
I tried checking with console log the code as above and it shows correctly true or false.
Aucun commentaire:
Enregistrer un commentaire