I can not seem to get the jQuery load function to work.
My HTML
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Document</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="Jquery_script.js"></script>
<script>$(document).ready(function(){ladda(); });</script>
</head>
<body>
<form namne="load">
<fieldset>
<legend>load</legend>
<table>
<tr>
<td><div id="L1"><h1>vill du ändra denna text</h1></div></td>
</tr>
</table>
<button id="load_text">ändra</button>
</fieldset>
</form>
</body>
</html>
the problem is that the load button does not load external content
the javascript file:
(function($){
ladda = function() {
$("#load_text").click(function(){
$("#L1").load("innehall.txt", function() {
alert('Load was performed.');
});
});
};
})(jQuery);
and the external .txt file only
<h2>du har ändrat innehållet</h2>
<p>detta är det nya innehållet</p>
Please help my figure out why the .txt file not is replacing the div id="L1" tag when pressing the button "ändra".