What am I doing wrong? jQuery 6/14


#1



6. Adding and removing elements jQuery

Oops, try again. It looks like your #text doesn't have the class .highlighted. Check the Hint if you need help!


$(document).ready(function() {
$('text').click(function() {
    $(this).highlight('highlighted');
   });
});


3/14 Modifying HTML elements! help! [SOLVED]
#2

if you want to target a element with an id, in jquery you need to use # + idname, so #text, not just text, that would refer to a html element <text></text> which doesn't exist


#3

Read the Instructions, you have to use .addClass()...

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


#4