jQuery Functions and Selectors 1/13: It works, but it won't let me continue


#1
$(document).ready(function() {
    $("div").mouseenter(function() {
        $("div").hide();
    });
});

When I run this, it works perfectly fine, and I even get the notification for the badge. But instead of letting me continue, I get the error:
Oops, try again. Did you call .hide() on your jQuery object?
What's wrong?


#2

After you press submit a full size window pops up you need to hover over your div and test if it work then only will it let you pass


#3

It did that for the other assignments but now it doesn't pop up


#4

You need to replace "div" make it this

 $(this).hide();

#5

Oh ya thanks I should be doing that. I've been just recalling the div selector.


#6

I still get the same error :confused:


#7

reset the code and past in your code and try again


#8

that didn't work either. :slightly_smiling: this is annoying


#9

paste in your code again pls


#10
$(document).ready(function() {
    $("div").mouseenter(function() {
        $(this).hide();
    });
});

#11

Under: jQuery Functions and Selectors which lesson no ?


#12

The first one. I've moved past it bc I know I did it right, it's just weird there's an error


#13

if there is any error it won't let you pass

The first lesson this one you don't need to add mouse enter.. Its just simple hide

Instructions : Practice makes perfect! Set up your jQuery code in the script.js tab with $(document).ready() and pass it a function that will immediately hide the orange div on the Result tab. (You can use the jQuery .hide() effect to do this.)

$(document).ready(function() {
    $('div').hide();
});

#14

I just opened the list of assignments and clicked on the next one. Oh wow thanks that worked. I didn't even notice that. Thanks for your help :grinning:


#15

No problem, you're welcome !
Happy Learning :slightly_smiling:
Happy coding !

What inspired you to learn programming ?
Join the discussion


#16

I need help idk what's wrong.


#17

line 3: li has to be in quotes
var $target = $("li");


#18

line 3:
var $target=$('ol li:last-child');