Opacity not fading


#1


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


I am stuck on this exercise. My code does not fade the div I am told "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!" - Thanks.


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


#2

I just tested your code and it let me pass!

Tho one solution can be to write the code in separate text editor then copy and paste it to script.js.

if your problem does not get sorted after doing that..read this thread
https://www.codecademy.com/en/forum_questions/560b26ba9113cb5d0e000380


#3

Thanks I have worked it out. I did not set my script tag to point to the javascript.


#4

Oh hehe, the problem existed in html file then!
cheers! :thumbsup:


#5

I m having this exact same issue, too, except my HTML to call the script looks right, and I've retyped everything multiple times and also attempted to paste from another text file.. I'm not getting syntax error.. just keeps telling me the opacity is not set to 1.

EDIT:

It was an HTML issue. I had the script tag before the head element. Not sure why this was an issue, but I placed this after the link for CSS stylesheet and it worked!


#6

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