This is what I have so far. Essentially we have an internal website that uses AFP links for Mac users and Windows IE style links for PC users. We have maintained the pages separately in the past, but I'm trying to unify them. I'm using div
s with ID's "brandsmac" and "brandspc" and attempting to hide the parts that are not necessary for each type of user. When I run this my page just comes back blank. To throw another wrench in here, this is a Wordpress site with a pure HTML front page. This is the front page. I have found similar posts here and many of them helped, but I've hit a roadblock. Thanks in advance.
function loadBrandsPage() {
var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) {
OSName="Windows";
} else {
OSName="MacOS";
}
if(OSName == "Windows") {
document.getElementById("brandsmac").style.display = 'none';
document.getElementById("brandspc").style.visibility="visible";
}
if(OSName == "MacOS") {
document.getElementById("brandsmac").style.visibility="visible";
document.getElementById("brandspc").style.display = 'none';
}
}