I've made an Ajax script that only loads (that's the plan) the content of the pages. The thing is it still reloads the whole layout, along with the views. How can I make it so it doesn't rerender when it already exists ? My Ajax:
$(document).ready(function() {
$('.navigation li a').click(function() {
var toLoad = $(this).attr('href');
$('#content').hide('fast', loadContent);
window.location = $(this).attr('href');
function loadContent() {
$('#content').load(toLoad, '', showNewContent())
}
function showNewContent() {
$('#content').show('normal');
}
return false;
});
});