11. Get Yourself In


#1

What is wrong here, pls?

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

they tell me that I didn't set div's opacity to 1.
thanks


11. Get Yourself In
#2

What lesson is this ?

You can try changing 'div' to this


#3

Sorry, I don't understand. What lesson? It is exactly like the title says.
Should I change "div" with what?


#4

'div' to this

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

Yes title of lesson or just send me link if easier


#5

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

I tried to change with this, but it doesn't work


#6

sorry your first code was correct, this you learn later on in the course..
Reset the lesson and paste in again and try or refresh your page. Once you press save and submit when the preview opens full screen make sure to click on the div and wait two seconds :slight_smile: You should pass


#7

thanks, Zainab, but it doesn't work


#8

Really odd works for me

Did you try refresh ?
Reset lesson and paste in ?
When preview pops up you need to hold your mouse over div for 2 seconds


#9
  1. yep
  2. yep
  3. yep
    I try in another browser.

#10

do that and let me know..
Send me a screen shot if you still get error


#11

reset code and then rewrite your code like this:

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


#12

tbh, its exactly, what you did at first. Maybe you just need to refresh your browser


#13

error both in Chromium and Mozilla


#14

Can I see your HTML code.. Thanks


#15

<html>
	<head>
		<title>Button Magic</title>
        <link rel='stylesheet' type='text/css' href='stylesheet.css'/>
	</head>
	<body>
     <div><br/><strong>Click Me!</strong></div>   
	</body>
</html>

#16

Omg here's why you getting error.. Your jQuery document is not linked to your HTML..

*Don't forget you use script tags to link jQuery


#17

@dorelian,
Could you please give us the code in your stylesheet.css file...??


#18

div {
height: 60px;
width: 100px;
border-radius: 5px;
background-color: #69D2E7;
text-align: center;
color: #FFFFFF;
font-family: Verdana, Arial, Sans-Serif;
opacity: 0.5;
}


#19

How, Zainab? I thought they are linked by <link rel='stylesheet' type='text/css' href='stylesheet.css'/>


#20

That links in your CSS

<script src="script.js"></script>

^this is how you link in jQuery