Return numeric value and addClass
<p>I need to find the numeric value inside a div and add a class accordingly. How do I find the numeric value? This seems to only return class of 'medium' so far.</p>

<pre><code>&lt;h4 class="days"&gt;Over &lt;span class="filterUrgency"&gt;71&lt;/span&gt; Days&lt;/h4&gt;

$('.days').addClass(function() {
    if ($('.filterUrgency').val() &gt;100) {
        return 'urgent';
    } else {
        return 'medium';
    }
});
</code></pre>

<p>or</p>

<pre><code>$('.days').addClass(function() {
var number = parseInt($('.filterUrgency').text());
    if (number &gt;100) {
        return 'urgent';
    } else {
        return 'medium';
    }
});
</code></pre>
