I'm looking for some kind of code to Show/hide based on dates.
So, a div will show 9/01/09 though 10/01/09 and show another after that.
Thanks
I'm looking for some kind of code to Show/hide based on dates.
So, a div will show 9/01/09 though 10/01/09 and show another after that.
Thanks
Hi,
You could try something like:
bring this up inside the header section of your page.Code:<script type="text/javascript"> <!-- onload = function() { var today = new Date(); var month = (( today.getMonth() ) + 1 ); var date = today.getDate(); var div = document.getElementById("divID"); if ( month === 10 && date === 1 ) // Your preferred date settings. div.style.display = "block"; else div.style.display = "none"; }; // --> </script>
zbphill (09-22-2009)
Bookmarks