$(document).on("click","table.tabinstructions a.news", getnews);
$(document).on("click","table.tabinstructions a.contact", getcontact);
function getnews(e){
e.preventDefault();
var href = $(this).attr('href');
getcontent(href, true);
moveL=0;
moveR=0;
}
function getcontact(e){
e.preventDefault();
var href = $(this).attr('href');
getcontent(href, true);
moveL=0;
moveR=0;
}
function getcontent(url, addhistory){
switch (url) {
case "HowToMakeAnOrder/":
url1 = "menucontent/helpcheckout.php";
break;
case "news/":
url1 = "menucontent/news.php";
break;
case "contact/":
url1 = "menucontent/contactcontent.php";
break;
default: url = "";
}
alert(window.history.length);
alert(window.history.state);
$.post(url1).done(function(data){
$("#mid").html(data);
if(addhistory==true) history.pushState(null, null, url);
});
}