Reputation: 539
I need to be able to show one div before the new year, and another after the new year - it's a set of certain form elements so I think this is the best way to do it.
Can someone point me in the right direction of syntax?
Any advice appreciated!
Upvotes: 0
Views: 1569
Reputation: 18491
if (new Date() < new Date(2011,1,1))
$('#before').show();
else
$('#after').show();
If both are hidden in the beginning.
Upvotes: 8