Undefined


#1

$(document).ready(function(){

$('div' ).hover(
function(){
$(this).addClass('active')
},
function(){
$(this).removeClass('active')
}
);

});

This is the jQuery I wrote in the 6.Hovr lesson..... What's wrong?
The computer keeps saying things like undefined or null blah 1 attribute blah....


#2

Hi Ben701,

Your code is fine. I suggest you try refreshing the page, or move your mouse slower:

mouse onto <div>
wait two seconds
mouse off of <div>
go back to the editor

(There are instructions right next to the Back to editor button that'll tell you what to do)