So, i've been trying to get this JQuery code to run in my HTML code, but it just won't. I have been looking the site over for ages, and still can't find a solution. (I found similar problems, but the fixes doesn't work.)
HTML:
<!DOCTYPE html>
<html>
<head>
<link href="../CSS/stylesheet.css" rel="stylesheet" type="text/css">
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js></script>
<script type='text/javascript' src='script.js'></script>
</head>
<body>
<div id="header"><h3 class="hf"></h3></div>
<div class="left">
<h3 class="arial"></h3>
<p></p>
<p></p>
<p></p>
<p></p>
<h3 class="arial"></h3>
<p></p>
<p></p>
<p></p>
</div>
<div class="picroll">
<tr>
<td></td>
<td></td>
<td></td>
<tr>
<td></td>
<td></td>
<td></td>
<tr>
<td></td>
<td></td>
<td></td>
</div>
<div class="right"><img id="pb" src=""/>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<lI></li>
</ul>
</div>
<div class="box">
<p id="fb">Add me on Facebook!</p>
<a href="#"><img id="flogo" src="https://www.seeklogo.net/wp-content/uploads/2013/11/facebook-flat-vector-logo-400x400.png"/></a>
</div>
</body>
<div id="footer"><p class="hf"></p></div>
So this is the whole thing. I removed the data itself, but I don't see it should be a problem.
JS:
$(document).ready(function() {
$('.box').mouseenter(function() {
$('.box').fadeTo('fast', 1);
});
$('.box').mouseleave(function() {
$('.box').fadeTo('fast', 0.5);
});
});
My guess is that I don't link to the JQuery script properly, but I can't find the answer. I simply want the ".box" to go from opacity 0.5 (which it is in my CSS file aswell) to 1 when hovering the mouse over it, and then go back to 0.5 when I remove te cursor again.