BUG: Jquery 12


Hi there, I'm having a problem with passing Jquery 12, and I think it's a bug in codecademy. Below is my code and the error message I get. Is anyone else having a similar problem?


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

The Message:

Oops, try again. It looks like you didn't set your div's opacity to 0.5. Check the example in the instructions if you need help!


Apparently to set the opacity back to 0.5 to pass through the lesson, one must type:

$('div').fadeTo("fast", opacity = 0.5);


@cloudslayer89235 Your original code was fine, you just need to make sure you move your mouse slowly and follow the instructions beside the “Back to editor” button.

That code shouldn't work, and I'm guessing it only does because jQuery is ignoring the opacity = part since it's only looking for a number. But you should stick with your code, because the second code you posted shouldn't be getting passed :slightly_smiling:


Yes, I just had the same issue. Have to type in:

$('div').fadeTo("fast", opacity = 0.5);

in the code editor to get past this lesson, even though that's the wrong code.