Reputation: 7956
$("#thinker01").click( function() {
$("#info").html("323");
if ($("#info").html == "323"){ //doesn't work - how to say this?
$("#imgOk").fadeIn();
}
});
Without if
- the fourth line works.
Upvotes: 0
Views: 52
Reputation: 382102
html is a function and must be called.
You may use this :
if ($("#info").html() == "323")
Upvotes: 2
Reputation: 1038720
if ($("#info").html() == "323")
Notice the ()
around the html function which is what is actually invoking it. Otherwise you are using it as a property and there's no such property.
Upvotes: 3