I thought I'd post this script here. Figured this out after doing some trial and error.

Have you ever wanted to have something disappear from your site after a certain date? This script will do just that.

You can follow the link here to see it in action: http://webfro.gs/scripts/js/timing_device/. I have also posted a link to download a demo with all the necessary files.

Here is the code...

The CSS

Code:
.DateRange, .DateDiv { display: none; text-align: center; }
The JavaScript

Code:
$(function() {
    $(".DateDiv").each(function(index) {
        var sRange = $(this).find(".DateRange").html();
        var arrTemp = sRange.split(" to ");
        var dtFrom = new Date(arrTemp[0]);
        var dtTo = new Date(arrTemp[1]);
        var dtNow = new Date();
        if (dtNow >= dtFrom && dtNow <= dtTo)
            $(this).show();
    });
});
The HTML

HTML Code:
<h2>The following image will disappear on August 2, 2013, at midnight:</h2>
<br />
<br />

<div class="DateDiv">
	<span class="DateRange">8/2/2013 to 8/3/2013</span>
    	<img src="img/button_home.jpg" width="250" height="252">
        <p>This can be text, too</p>
</div>
Here's another sample of it on the web that I built. Click here(jsfiddle).


Regards,