BUG: Can't get past jQuery 11


#21

Nope, not working in Chrome v.47.0 either.

My code:

 $(document).ready() {
    $('div').mouseenter(function(){
        $('div').fadeTo('fast', 1);
        )
    }
}

The error message I get in Firefox is:
SyntaxError: missing ; before statement

And in Chrome it says:
Uncaught SyntaxError: Unexpected token {

[edit] It’s possible my code has errors - but I tried OP’s which didn’t work, then restored mine, then tried the CSS fix which got me past.


#22

@maushawk Thanks for posting the code! It looks to me like the problem is at least for now in your code, rather than the exercise. It should look more like this:

               // ↓ you're missing `function()`, and it belongs inside the `ready()` parenthesis
$(document).ready(function() {
  $('div').mouseenter(function() {
    // ...
  }); // ← the parenthesis here should come after the closing curly brace, since they get opened first
}); // ← this is where you should be closing `ready()`

Edit:
Oops, just saw your edit :smile: Still, I hope that my answer helped you :slight_smile:


#23

PEBKAC, disregard. :smiley:


#24

It was the waiting two seconds that I wasn’t doing. Thanks for your help!


#25

I am experiencing the same issue on the safari browser. My code is;

    $('div').mouseenter(function() {
        $('div').fadeTo('fast',1);
    });
});```
My error message is telling me that I am not changing the <div> opacity..

#27

This did not answer my question…


#28

@corejumper79653 Are you hovering on the <div> for two seconds? And also, have you tried switching browsers?


#29

I have waited in the div for more than 5 seconds and also tried in Mozilla Firefox

Is the code itself, fine?


#30

I have done what Bulbe has suggested and changed the Opacity to 1 in the CSS file.
I was trying to avoid this as I was wanting to do it properly but I still gained the learning.

Hopefully this issue is resolved soon, for future users…


#31

@corejumper79653

Sorry, I should’ve answered that in my post. Yes, your code is fine.

I’m glad the workaround worked for you, I do agree that it’d be great if we can get it fixed - the only thing is that it’s not going to get fixed until we can figure out what the problem is :confused:


#32

This fixed it for me. I wouldn’t have thought to change my css, thanks so much!


#33

This worked for me! Thanks!


#34

Thanks. This helped me get to the next one.


#35

This worked for me as well! Thanks. Its a shame we have to do that though to get past it


#36

Just went through the same thing - and fixing the CSS worked for me as well.

I spent a lot of time trying to get past this - using different browsers - even on different computers - clearing cache on all of those browsers and computers, etc., etc.

It really does appear that the stylesheet needs to be changed from " opacity: 0.5" to " opacity: 1;"


#37

Also - when I get to lesson 12 - the stylesheet reads “1” instead of 0.5 – which is what that lesson is asking for in jquery.

Perhaps the two were flip-flopped?


#38

Check below and make sure to hover your mouse over the div. Make sure you refresh the page also

$(document).ready(function() {
    $('div').mouseenter(function() {
        $('div').fadeTo('fast', 1);
    });
});

#39

memoroo, first and foremost, thanks! I was actually stuck on 12, not 11, but with the same issue. I applied your change and it resolved the issue. What’s interesting to note, though, is that while I got the Way to Go! message, and the button to let me move on to the next problem, I also got the following error message at the same time:

Oops, try again. Please follow the instructions on the FullPreview page to test your code:

So there are definitely some bugs going on here. Can’t complain too much, since it’s free, but it is frustrating to spend five or ten minutes trying to move on when you know your code is correct.

It’s also annoying that the link to the report a bug page returns a 404 now.

Anyway, all that aside, thanks again to you for your help. Very appreciated.


#40

@jetboy2k You need to move a little slower on the Full Preview page.


#41

I had the same problem and this fixed it. Thanks!