I want to update the contents/portlets of my pages, without reloading the whole page.
I tried using jQuery .load()
in navigation.ftl:
<script type="text/javascript">
$(document).ready(function(){
$("nav#navigation ul li a").click(function(){
var page = $(this).attr("href");
$("#content").load(page);
});
});
</script>
I added e.preventDefault()
to prevent the default functionality from occurring as suggested by Sudakatux and It works but this does not resolve my problem, because the entire page (including head and body) is wrapped inside the div#content
each time I click on a menu (see the screenshot below).