It looks like you didn't set your div's opacity to one


I am stuck at exercise 11: Get Yourself In...
It keeps on saying that I 'didn't set your div's opacity to one.', even though I'm pretty sure I got it.
Here is my code:

        $('div').fadeTo('fast', 1);

Can someone please help?

Doesn't set opacity to 1

Hi, Your code looks fine to me, try refreshing your page :slight_smile:


maybe u just try to refresh the page. it should be work :slight_smile:


I refreshed my page 2 times and the script still doesn't work. :confused:


How's your HTML and CSS file and which browser. See if your browser is up to date.


My HTML and CSS looks fine, and I'm using Google Chrome...




Google Chrome browser and it's working fine. If you use any NoScript extension on your browser then it might affect. But again that's a guess now.


@fireburst Paste in your HTML and CSS


change your css opacity to 1.


^This is what worked for me too. Had to change the opacity in stylesheet.css


@tfreeberg @jameskimaru

Hi, Nope you guys shouldn't change it in CSS, as this lesson is teaching you how to do it via jQuery.

Doing it in the stylesheet defeats the purpose of the lesson.


Right, but if the page is buggy and won't let me submit valid jQuery I'm going to hack around it in order to continue the course.


Here's the solution I found. The opacity argument actually accepts a float and not an int. So when the instructor states that they want you to set the opacity to 1 they actually mean to set it to 1.00, and not 1. That worked for me.


JavaScript accepts both should not be a problem if it is integer or float. It has only one number type neither int nor float. But it's better not with a leading zero like 01 although it might work but not at all a good practice.


A post was split to a new topic: It looks like you didn’t set your div’s opacity to one