$(document).ready(function(){
console.log("test1")
// following commented line take running url or (active)site name but i set hard coded for demo
//var getCountryPath = window.location.host.split(".")[0];
var getCountryPath="om";
if(getCountryPath == "in"){
$("li").removeClass("active");
$("li > a[href='#india']").parent().addClass("active");
$("#india").addClass("active");
}
if(getCountryPath == "qa"){
$("li").removeClass("active");
$("li > a[href='#qatar']").parent().addClass("active");
$("#qatar").addClass("active");
}
if(getCountryPath == "om"){
$("li").removeClass("active");
$("li > a[href='#oman']").parent().addClass("active");
$("#oman").addClass("active");
}
if(getCountryPath == "uae"){
$("li").removeClass("active");
$("li > a[href='#uae']").parent().addClass("active");
$("#uae").addClass("active");
}
var hide = function (elem) {
elem.classList.remove('is-visible');
};
});
console.log("test1")
// following commented line take running url or (active)site name but i set hard coded for demo
//var getCountryPath = window.location.host.split(".")[0];
var getCountryPath="om";
if(getCountryPath == "in"){
$("li").removeClass("active");
$("li > a[href='#india']").parent().addClass("active");
$("#india").addClass("active");
}
if(getCountryPath == "qa"){
$("li").removeClass("active");
$("li > a[href='#qatar']").parent().addClass("active");
$("#qatar").addClass("active");
}
if(getCountryPath == "om"){
$("li").removeClass("active");
$("li > a[href='#oman']").parent().addClass("active");
$("#oman").addClass("active");
}
if(getCountryPath == "uae"){
$("li").removeClass("active");
$("li > a[href='#uae']").parent().addClass("active");
$("#uae").addClass("active");
}
var hide = function (elem) {
elem.classList.remove('is-visible');
};
});
No comments:
Post a Comment