Hello all –
i’ve been trying to get a script working cross-browser to show and hide a div based on window size. I managed to find something that worked here in the forums, but i can only get it to work in IE. Can someone take a peek and see what’s up with the script?
script:
[code=html]<script>
function winDet() {
document.getElementById(‘rightside’).style.display = (document.body.offsetWidth < 800) ? ‘none’ : ‘block’;
}
</script>
and then i’m calling the function from the body tage as well:
[code=html]<body onload=”winDet()” onresize=”winDet()”>
again, it works in IE, but not mozilla. any thoughts or advice?
thank you in advance.