No 6 Hover question





why is it that active is not ".active" instead of just "active".


.addClass only works with classes, so it knows that you need a class.

You don't have to put a dot in this case.


because you are just adding a class to the html element and you wish to call it "active" but if you wanted to to refer to the element with that class then you would use ".active"
eg: if i wanted to append some text to that div after adding the class then i could use the class like this

$(".active").after("some random text");


That makes sense. Thank you