12 topic


#1

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

Why it do not work at browser? Only at codecademy ?


#2

Hi Kostya,

Could you please post and format your code in index.html?
​You can format code by selecting it all while in the post editor, and pressing Ctrl/Cmd + K, or by adding a new line and three backticks (`) before and after your code, like this:


```
<code> will show up properly here
```

Thanks!


#3
<!DOCTYPE html>
<html>
	<head>
		<title>Button Magic</title>
        <link rel='stylesheet' type='text/css' href='stylesheet.css'/>
        <script type="text/javascript" src="script.js"></script>
	</head>
	<body>
     <div><br/><strong>Click Me!</strong></div>   
	</body>
</html>

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

It works at codecademy, but when i try to use it in browser - no JQ magic ...


#5

Thanks for posting your code, @codemaster05821 :)
Add this right before your other <script> tag:

<script src="https://code.jquery.com/jquery-latest.min.js"></script>

and your code should work :)


#6

it turns on the library? Thanks a lot, they must write it on the first page)


#7

hi
do when we are connecting a jquery with a html so what address will so in.
please help


#8

@courserockstar69236 That sentence makes no sense at all. Please try rewording your question, & I'll see if I can help you :slightly_smiling:


#9

i mean why did you put this address


#10

@courserockstar69236 Because it works well & will always serve up the latest version of jQuery.


#11

so when connecting html with js in local server ,what address will go in


#12

@courserockstar69236