when i click on this menu links i get it on my div, but how can i also set a URL variable so if i click <a href="admin.php">
i get my new url www.foo.com/admin.php i just see the load. if i access directly www.foo.com/admin.php i should get the index.php loading this admin.php and doing the process again, so my admin should also redirect when coming direct at it, someone help me with the way to set the URL with AJAX
var pathname = window.location.pathname;
$("#page-inner").load(pathname+'dashboard.php');
$('#main-menu a').on("click", function (e) {
if (this.href .indexOf('#') == -1) {
e.preventDefault();
$("#page-inner").load(this.href, function () {
}).hide().fadeIn('fast');
return false;
}
});