I want to add a new Class to body if an ID has a specific style attriute using jQuery. Why is this code not working:
if ($('#myID').css('display') == 'none'){ $('body').addClass('loaded'); }
Thank you in advance!
Aucun commentaire:
Enregistrer un commentaire