6. Adding and Removing Classes


#1

Hi,

This is my jQuery code:
$(document).ready(function() {
$('#text').click(fucntion() {
$(this).addClass('highlighted');
});
});

This is the error message I get when I try to run:
Oops, try again. Please follow the instructions on the Full Preview page to test your code.

What could I be doing wrong?

Thanks.


#2

Hi this line

$('#text').click(fucntion()

you wrote fucntion instead of function


#3

Wiz is correct! Good luck!


#4

Thanks. I managed to solve it.


#5

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