Why does it tell me I'm not setting the div's opacity to 1?


#1

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

here is my code. but i still have such answer, what is wrong?
"Oops, try again. It looks like you didn't set your div's opacity to 1. Check the example to in the instructions if you need help!"


Didn't set your div's opacity to 1
#2

Hi Artem,

Your code looks good to me. Could you try refreshing the page, and see if that helps?

If not, please post a link to the exercise you're on :slight_smile:


#3

4 posts were split to a new topic: "It looks like you didn't set your div's opacity to 1" error on 2/3


#4

This lesson still appears to be a problem, as was discussed quite some time ago in the old forum as far back as two years (https://www.codecademy.com/g/5304f2887c82ca9b59008a21)

I was able to get the "right" answer by setting div opacity to 1 in "stylesheet.css", which is obviously not what the section is about, but I have not actually been able to get the mouseover fadeTo to work correctly.


#5

Try and change the css opacity to 1. Hope it'll work.


#6

here is code:
https://www.codecademy.com/courses/web-beginner-en-bay3D/2/3?curriculum_id=50a3fad8c7a770b5fd0007a1#


#7

@artem_rs Hm well, your code works for me.

Could you try switching browsers?


#8

Hi @artem_rs. I had the same problem, but I hit refresh and then instead of clicking on the 'Click Me!' button on the preview to test it, I just hit the 'Save and Submit Code' button and it allowed me to go on. I am wondering if you click on the preview button before submitting, it doesn't understand that the button is able to fade to 1 opacity. (Also, per the recommendation from @jameskimaru, I set the div opacity to 1 in the CSS file.)


#9

When you click Save & Submit Code, move your cursor to click me button, wait for 2 seconds and you 're ok (Had the same problem one or two chapter afterwards)
Hope I helped you :slight_smile:


#10

Had the same problem, there is most certainly a bug. The only way around I think is by changing the CSS opacity to 1


#11

I got past the lesson,but the button didn't fade.:open_mouth: At least I got past...


#12

I switched to Firefox and it worked. I was getting this error on Chrome.