Hi!
I need to hide a Div with an id (ApDiv1) depending on the window.location. I’m using this script, but nothing happens… Any suggestions??
<script type=“text/javascript”>
function hideDiv() {
var url = “http://www.example.com.pt/catalog/index.php”;
if (document.location.href == url) {
document.getElementById(“apDiv1”).style.visibility=‘visible’;
} else {
document.getElementById(“apDiv1”).style.visibility=‘hidden’;
}
}
</script>
I would like that when the url would be something like this:
http://www.example.com.pt/catalog/index?cPath=32_32
or anything else, the Div would hide…
Thanks in advance!