lundi 15 janvier 2018

jQuery, very simple if hasClass won't work? [duplicate]

This question already has an answer here:

so here is very simple code that I think is suppose to work"

if ($("#mylogo").hasClass(".logo")) {
        $("#mylogo").html("test");
        }

I double checked if .html page indeed has this H1 with #mylogo and .logo class, so that is not a problem....

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire