6. Adding & Removing Classes


#1

I dont know where i am wrong...

My code:

$(document).ready(function(){
$('#text')click(function(){
$('#text').addClass('.highlighted');
});
});

Link: https://www.codecademy.com/en/courses/web-beginner-en-v6phg/1/1?curriculum_id=50a3fad8c7a770b5fd0007a1


#2

$(document).ready(function(){
 $('#text')click(function(){ // before click add dot
 $('#text').addClass('.highlighted');
 });
});

#3

hahahah omg!!! what a silly mistake!!
thanks!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.