$('[id^="nav-link-"]').click(function(event) {
$('#top-nav .selected-link').removeClass('selected-link');
$(this).addClass('selected-link');
var linkQuery = {
url: "loadPage.php",
type: "GET",
dataType: "html",
data: {
"page": $(this).attr('id')
},
beforeSend: function(jqXHR, settings) {
$('#center-content').hide();
},
success: function(data, textStatus, jqXHR) {
$('#center-content').html(data).fadeIn(850);
},
error: function(jqXHR, textStatus, errorThrown) {
alert('error');
}
};
$.ajax(linkQuery);
return false;
});
Is there anyway to make an AJAX call and update the url? Do I have to use something like an iframe to do this?

New Topic/Question
Reply


MultiQuote



|