Show Div When Dates Match Using .Each
<p>I have a list of job postings and would like to display a div that say 'New' when the date is equal to today's date.</p>

<p>To create this I have created a javascript code that will execute on a loop for each set of outer div's, but I am having trouble correctly running the .each function.</p>

<p><strong>Here is the link to a JSFiddle: <a href="http://jsfiddle.net/jeremyccrane/2p9f7/" rel="nofollow">http://jsfiddle.net/jeremyccrane/2p9f7/</a></strong></p>

<p>Here is the HTML Code:</p>

<pre><code>&lt;div class="outer"&gt;
    &lt;div class="job-date"&gt;07-Feb-13&lt;/div&gt;
    &lt;div class="new" style="display:none;"&gt;NEW&lt;/div&gt;
    &lt;div class="value"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="outer"&gt;
    &lt;div class="job-date"&gt;12-Feb-13&lt;/div&gt;
    &lt;div class="new" style="display:none;"&gt;NEW&lt;/div&gt;
    &lt;div class="value"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Here is the Javascript code:</p>

<pre><code>$( ".outer" ).each(function(i) {
        var jd = $(".job-date").text();
        j = jd.substr(0,2);
        var today = new Date();
        var dd = ( '0' + (today.getDate()) ).slice( -2 )
        $('.value').html(dd + "/" + j);    
        if(dd === j) {
            $('.new').show();
        } else {
            $('.new').show();   
        }
        return false;
    });
</code></pre>
