JQuery Ajax load request when page is loaded
Hi
Would just like some help on this one. Trying to load a portion of a page using Ajax with JQuery immediately after the page has loaded (no user intervention required).
I'm use the following but nothing happens:
-
<script type="text/javascript">$(document).ready(function(){
$("#loading").bind("ajaxSend", function(){
$(this).show();
}).bind("ajaxComplete", function(){
$(this).hide(); });
$('#mainView').load('page.php');
});
</script>
Would someone be as kind as to tell me what I'm doing wrong?
Thanks in advance.
Lionel