12/13 potential Bug!


#1

So the correct code in script js should be:

$(document).ready(function() {
    $('div').mouseenter(function() {
        $('div').fadeTo('fast', 1);
    });
    $('div').mouseleave(function() {
        $('div').fadeTo('fast', 0.5);
    }); <-- note this line
});

However that does not pass, I can only pass if I miss off the second last bracket like so:

$(document).ready(function() {
    $('div').mouseenter(function() {
        $('div').fadeTo('fast', 1);
    });
    $('div').mouseleave(function() {
        $('div').fadeTo('fast', 0.5);
    }; <-- see the missing bracket
});

Can anyone explain?


#2

It passes for me, you have the code correct in the first box. Must be a bug. Codecademy is still in the works, and is bound to have a few bugs here and there.


#3

Glad it passes.

Just flagging in case anyone gets stuck and so they know it's there.


#4

Thanks for posting this - I couldn't get the correct code to pass, either. Taking out that bracket fixed it.


#5

Something wrong. Code good, but i get alert message.


#6

@bitrockstar95512 Move your mouse slowly on the full preview page, and wait for the instructions by the "back to editor" button in the lower-left of the page before you do stuff, and the error will go away :)


#7

thanks for this. also had no luck working on this exercise in Chrome. Had to switch over to Firefox.


#8

Thanks spacecamel, that bug held me up too. Would have never have guessed to try to drop a parenthesis. You saved me a lot of time!


#9

A post was split to a new topic: Need help on 12/13


#10

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