I am trying to create a small simple JS framework for educational purposes, but now I have a problem that I cannot solve.
Directory structure
/
/framework
jquery.js
init.js
/content
home.html
style.css
index.html
Problem
I obviously don't insert the jQuery file and stylesheet here, but here is index.html and init.js:
index.html
<!DOCTYPE html>
<head>
<script src="framework/jquery-1.5.min.js"></script>
<script src="framework/init.js"></script>
<title>My website</title>
</head>
<body>
<div id="content">
</div>
</body>
</html>
init.js
$(document).ready(function(){
if(!window.location.hash) {
$("#content").load("../content/home.html", function() {
alert("Load was performed.");
});
}
});
The home.html file contains some sample text, nothing special. I expect jQuery to load the contents of home.html into the contents of the div, but nothing happens when I load the page. However, a warning message saying "Download has been completed."
This task seems rather trivial for me, so the mistake I made is probably pretty stupid, but any help, however, is greatly appreciated.
Thank!
Update:
, , localhost . Firebug, , . ?