6. Adding and Removing


#1

Hi All,

I'm having trouble with my code below. It looks right to me and I searched and found a similar answer but when I submit I am getting the following error " Oops, try again. It looks like your #text doesn't have the class .highlighted. Check the Hint if you need help!"

Could I please get some insight into what I'm doing wrong...

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

Thanks,
Adam


#2

This^ shows that you are specifying a class so the . before highlighted is not needed thus it doesn't work.


#3

Thanks @zainabrawat, that worked. I appreciate the help!


#4