JQuery Events 6/12


#1

I am receiving an error message : "Oops, try again. Unable to get property '1' of undefined or null reference". My code appears to be correct but I don't have the slightest idea of where I am off. Below is my code.

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

});


#2

I tried your code in a windows 8.1 IE11 environment and got a pass
Maybe....

under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

**Addendum **
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).


#3

I had the same error. I tried resubmitting multiple times without changing the code. Eventually it worked. On the full screen page, you should get a message asking you to move the mouse into div. When the mouse is in the div it asks you to move out. Sometimes one or both of the messages just don't seem to appear.


#4

I reset code and retyped all necessary parts of it.
It's worked! =)


#5

I needed to get both messages "Move your mouse inside the div" and "Move your mouse outside the div" appear three times total and then it let me pass.

"Move your mouse outside the div" did not appear at all if I was too slow to move my mouse upon a div when sending the code.