A JQuery plugin to show or hide content based on date and time.
Download and include the plugin after including JQuery, at the bottom of your HTML file:
<!-- Include JQuery -->
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Include Plugin -->
<script src="js/scheduled-content.js"></script>
Using the plugin, you can specify a start date, and end date, or both.
This will show the content only after a certain date.
<script>
$('#selector').scheduleContent({
start:'12/26/2014'
});
</script>
This will show the content only before a certain date.
<script>
$('#selector').scheduleContent({
end:'12/26/2014'
});
</script>
This will show the content between two dates.
<script>
$('#selector').scheduleContent({
start:'12/26/2014',
end:'12/31/2014'
});
</script>
You can enter dates in any format accepted by javascript
Please see demo.html for a fully worked up example based on The Twelve Days Of Christmas