Adding and Removing Classes


#1

What is wrong with my code.

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


#2

a full stop (.) at the beginning of a selector indicates you are dealing with a class.

but given addcClass will add class, you don't have to add a full stop at beginning


#3

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