Please have a look at the following:
jQuery(document).ready(function() {
var full_url = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname;
var part_url = window.location.protocol + "//" + window.location.host + "/domain/shop/";
part_url = part_url + "cat1/";
if (full_url == part_url)
{
jQuery("li.cat1").addClass("current");
}
});
For some reason the above code never becomes true and I am puzzled as why. I have individually alerted out the variable "part_url" and "full_url" and they both matched so why is the if statement not returning true? I know it's probably something silly that I've missed...