Checks if a value exists in an array input value by jquery
<p>I want check if id in array value input:cheched <code>3</code>, <code>alert (true)</code> else <code>alert (false)</code>. I tried as following js code, but don't work for me. </p>

<p>How can fix it?</p>

<p><strong>DEMO:</strong> <a href="http://jsfiddle.net/VAwHR/4/" rel="nofollow">http://jsfiddle.net/VAwHR/4/</a></p>

<p><strong>HTML:</strong></p>

<pre><code>&lt;input value="3" type="text" id="seeid"&gt;
&lt;div class="paginate"&gt;
    &lt;input name="ch[]" type="checkbox" value="1" checked&gt;
    &lt;input name="ch[]" type="checkbox" value="2"&gt;
    &lt;input name="ch[]" type="checkbox" value="3" checked&gt;
    &lt;input name="ch[]" type="checkbox" value="4"&gt;
&lt;/div&gt;
&lt;input type="submit" class="sub"&gt;
</code></pre>

<p><strong>JQUERY:</strong></p>

<pre><code>$('.sub').click(function(){
    var seeid = $('#seeid').val();
    var db = $('.paginate :checkbox:checked').map(function (i, n) {
        return $(n).val();
    }).get();
    alert($.inArray(seeid, db))
})
</code></pre>
