Is it possible to create a ajax page load without php? So just load the content of the linked page (if intern) and insert it into the current page.
I tried this, but it does not work (just nothing happens, when I click a link): http://www.johnmorrisonline.com/jquery-tutorial-ajax-load-content-with-no-page-refresh/
My code is this:
$(document).ready(function(){
// Set trigger and container variables
var trigger = $('a'),
container = $('#content');
// Fire on click
trigger.on('click', function(){
// Set $this for re-use. Set target from data attribute
var $this = $(this),
target = $this.data('target');
// Load target page into container
container.load(target);
// Stop normal link behavior
return false;
});
});