Our client has two URL's that point to the same page. Depending on which URL the user comes through they want to display and hide certain content. I have the following code and everything looks like it should work (doesn't it always....) but for some reason the if doesn't evaluate to true. The alert is in there for troubleshooting purposes.
var this_page = window.location;
var calc_address = "DIFFERENT ADDRESS";
alert(this_page);
if(this_page == "http://www.calculatesnowguards.com/"){
$('#mashead').css('background-image', 'url("../images/masthead_bg.jpg") ');
$('.calc_remove').hide();
$('#bottom').innerHTML = calc_address;
}
console.logoveralert. =)