I just finished codecademy tutorials on html, css, js and jQuery. Now I am trying to create something on my own. But I can't make even the simplest thing work. I did everything in some kind of "browser consele lab" till now. Question is, how do I use or include jQuery in my index.html so it will work when I open it in browser? After some searching I used google hosted libraries links but it still doesn't work. I have 3 files created: index.html, style.css and script.js.
Now it just loads page with that square on it, but does nothing when I click it, even tho my jQuery code should be correct.
index.html code:
<!DOCTYPE html>
<html>
<head>
<title>My thing</title>
<link rel='stylesheet' type='text/css' href='style.css'/>
<script type='text/javascript' src='script.js'></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
</head>
<body>
<div>
</div>
</body>
</html>
style.css code:
div {
height: 250px;
width: 250px;
background-color: #008800;
}
script.js code:
$(document).ready(function(){
$('div').click(function(){
$(this).effect('explode');
});
});