<script src="http://www.google.com/jsapi"></script>
<script>
google.load("jquery", "1");
google.load("jqueryui", "1");
</script>
<script type="text/javascript" src="">jquery.form.js"></script>
<script type="text/javascript" src="">jQueryFunctions.js"></script>
I wrote 2 functions in my little jQueryFunctions.js library file thus:
$(document).ready(function()
{
$("a").click(function()
{
$("#pageContainer").load($(this).attr("href"));
return false;
});
$("form").submit(function()
{
var options = { target: '#pageContainer' };
$(this).ajaxSubmit(options);
return false;
});
});
Now, before you think this is the solution I also need to point out one small thing. When you load a page into the pageContainer div, it too needs to have all that JavaScript header stuff. Otherwise it won't work.