This function disables the default action for a link, and changes the URL using the pushState function. I need to be able to detect if a browser does not support this function, so that I can stop the preventDefault() function.
$("a").click(function(event) {
var url = "";
var url = $(this).attr('href');
// Disable Default Action and Change the URL -
event.preventDefault();
window.history.pushState("somedata", "Title", url);
//Call Function to change the content -
loadContent(url);
});
Any recommendations are greatly appreciated