rexjiang92
4/13/2018 - 9:21 PM

jQuery Switch Case

//Custom subbanners without page specific classes
var currentPath = window.location.pathname;

switch(currentPath) {
    case "/about-us":
        jQuery("body").addClass("page-about-us");
        break;
    case "/node/6":
    jQuery("body").addClass("page-about-us");
    	break;
}