Problem jest taki:
gdy zawartość
wrzucę nad
, to kod się NIE wykonuje.
Oczywiście, wolałbym by było to na górze, z racji takiej, iż będzie tam w przyszłości pewnie więcej kodów jquery.
Czy ktoś może się orientuje w czym tkwić może przyczyna?
poniżej oryginalny cały kod, który działa
Kod
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Five Ways of Making AJAX Calls with jQuery -DEMO</title>
</head>
<body>
<input type="submit" value="load()" id="load_basic" />
<div id="result" class="functions"></div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$.ajaxSetup ({
cache: false
});
var ajax_load = "<img class='loading' src='img/load.gif' alt='loading...' />";
// load() functions
var loadUrl = "ajax/load.php";
$("#load_basic").click(function(){
$("#result").html(ajax_load).load(loadUrl);
});
</script>
</body>
</html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Five Ways of Making AJAX Calls with jQuery -DEMO</title>
</head>
<body>
<input type="submit" value="load()" id="load_basic" />
<div id="result" class="functions"></div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$.ajaxSetup ({
cache: false
});
var ajax_load = "<img class='loading' src='img/load.gif' alt='loading...' />";
// load() functions
var loadUrl = "ajax/load.php";
$("#load_basic").click(function(){
$("#result").html(ajax_load).load(loadUrl);
});
</script>
</body>
</html>