I've managed to get my main navigation to work so that JQ loads the content HTML from another file and places them as the innerHTML of my main content div. However, each time that I refresh the page it returns me to the default state of the file, that is without the content that was dynamically altered via JQ. Also, I can't figure out a way to link to the index page with the altered content since the URL stays the same. Any idea on how to do these things?
Here's the function used for dynamically altering the content:
$(document).ready(function() {
$('#menu_items').on('click', '#menu_items a', function(event) {
event.preventDefault();
var href = $(this).attr('href');
$('#main_content').load(href);
});
});