Possible bug in "get yourself in..." and "...get yourself out!"


https://www.codecademy.com/en/courses/web-beginner-en-bay3D/2/3?curriculum_id=50a3fad8c7a770b5fd0007a1 (Exercise 11 and 12)

I've copied and pasted the correct code for 'script.js' SEVERAL times. My code works on the HTML both in preview mode and full screen mode. The program itself is just wigging out or something. After double and triple checking that my other files were set up correctly. The error message reads: "Oops, try again. Please follow the instructions on the Full Preview page to test your code."

    $('div').mouseenter(function() {
        $(this).fadeTo('fast', 1);


So did you follow the instructions on the Full Preview? You need to move your mouse to the DIV then wait 2 seconds.


Yes I think there is a bug here.

Can make it work in JSFiddle but only if you include the jQuery CDN link


Perhaps theres a bug in the jQuery CDN for that particular exercise?

Also noticed theres an error message on the exercise page Uncaught SyntaxError: Unexpected identifier
suspocious indeed...


Yes. My jQuery functions are identical to the examples in the Full Preview page instructions(left side bar). Yes, like I mentioned, the functions work in the html preview (right side bar) both in half preview and full screen mode.


I can't get the mouseleave to work. I put in 0.5 but it keeps telling me thats wrong.

This give me an error....



I get the same error too. I put 0.5 and still get an error message.


The code looks perfect. I had this same issue and @oscartbeamish's advice is what fixed it. I hovered my mouse over the div, waited 2+ seconds, removed mouse from div, waited 2+ seconds. I thought it was broken the first few times but it just took patience.


I am experiencing the same issue with this specific challenge. "get yourself in..."


I am still having the same problem if you can solve it please tell me what am i supposed to do


I have the same problem.


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

Saved and submit, waited two secs, mouse over the div and waited for 2 secs, mouse removed from the div and waited for 2 sec again. Nothing happened.

I reset the code, entered my code above, and now the Full page Preview cant even detect my mouse over the div anymore. Waited for more second and still nothings happening....


Lol, the problem is in my code the whole time.
I was good after I changed it to this:

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


I really couldn't figure out the problem with my code.
Even after using this in script.js
$(document).ready(function() {
$('div').mouseenter(function() {
$(this).fadeTo('fast', 1);

and this.
$(document).ready(function() {
$('div').mouseenter(function() {
$('div').fadeTo('fast', 1);
I was able to get through this by changing the opacity value in stylesheet.css to "1". Like this:

div {
height: 60px;
width: 100px;
border-radius: 5px;
background-color: #69D2E7;
text-align: center;
color: #FFFFFF;
font-family: Verdana, Arial, Sans-Serif;
opacity: 1;

If you are at the point where you are going to give up on JQuery because you can't get through this problem, this is one way around it.


Even i faced this problem, but I now I know the solution.
in get yourself in... after you click on save & submit code move your mouse cursor to the click me block. Keep your mouse in the block for 2 seconds....(see bottom of screen for instructions) and then move the mouse out. This will indeed solve the problem.

For ...get yourself out you need to just get in the block and move out...(no need to wait for 2 seconds inside the block). But once you are out of the block, wait for 2 seconds on the screen and then proceed.

I did it this way and completed both of the exercise.


Simply change 'div' to this in the second function

$('div').mouseenter(function() {
$(this).fadeTo('fast', 1);

That fixed the problem for me!


This method worked for me! Thank you so much!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.