Selector refinement -> Each non-empty input
<p>Could use a little help with this, it seems like there should be a cleaner way to write this out. </p>

<p>I want to select each text input in the #endowment div, that is not empty.
Also, I am writing to a div called 'dyn_hidden', that I want to append each input with a value in it. So on each blur I'm deleting everything, and then adding each one back. Is there a better way for this?</p>

<p>Thanks!</p>

<pre><code>jQuery("#endowment input[type='text']").blur( function() {

    // Empty out dyn_hidden div
    jQuery('#dyn_hidden').html('');

    jQuery("#endowment input[type='text']").each(function() {
        if(jQuery(this).val() !== "") { 
            end_fund      = '&lt;input type="hidden" name="fund[]" value="'+jQuery(this).attr('title')+'"&gt;';                                                                                                                  
            end_amount    = '&lt;input type="hidden" name="amount[]" value="'+jQuery(this).val()+'"&gt;';
            jQuery('#dyn_hidden').append(end_fund, end_amount);
        }
    });
});
</code></pre>
