Find if some of the element's attributes contains specific value
<p>I was thinking if there is a way to find if element's attribute contains a specified value. The attribute is unknown. If I have this HTML:</p>

<pre><code>    &lt;input class="first" type="checkbox" data="THE-VALUE" /&gt;
    &lt;input class="second" type="checkbox" /&gt;
    &lt;input class="third" type="checkbox" name="THE-VALUE" /&gt;
</code></pre>

<p>I want to find all the inputs that has attribute with value <strong>THE-VALUE</strong> (in this case <code>.first</code> and <code>.third</code>). I don't need solution for this case where inputs are 3, but if I have 50 inputs and the attributes containing THE-VALUE are all different. I have tried things like <code>.attr(':contains("THE-VALUE")')</code> and <code>$('input[="THE-VALUE"]')</code>, but by obvious reasons it doesn't work. </p>

<p>So my question is .. is there any way to find that ?</p>
