jQuery .data() Selector
<p>This question has been asked before, but I can't find any answers that have been given since May 2010. If one or more of these answers are still relavent, I'd be happy to delete this question.</p>

<p>Does jQuery have a selector that will allow me to filter by values added by <code>.data()</code>?</p>

<p><strong>Example: (see comments)</strong></p>

<pre><code>//Set IsValid data attribute on all elements that have fired the blur event
$(".txtPayment").blur(function (e) {
    if (IsCurrency($(this).val()))
        $(this).data("IsValid", true);
    else
        $(this).data("IsValid", false);

    SumPayment();
});

//Sum all payments

// I'd like to be able to select all inputs with:
// class == "txtPayment" value != "" &amp;&amp; IsValid == true
$('.txtPayment[value!=""]').each(function ()
{
    var sum = 0;

    if ($(this).data("IsValid"))
    {
        sum += Number($(this).val());
        $(this).removeClass("textError");
    }
    else
    {
        $(this).addClass("textError");
        $("#spanSumPayment").addClass("textError");
    }
});
</code></pre>

<p>Is this possible <strong>without plugins?</strong></p>
