Get checkbox with specific value

Posted by PalAla on Stack Overflow See other posts from Stack Overflow or by PalAla
Published on 2012-06-07T10:30:54Z Indexed on 2012/06/07 10:40 UTC
Read the original article Hit count: 240

Filed under:
|

I want to get checkbox with specfic value and make it checked..

I make like this

$(":checkbox").filter({"value":5}).attr("checked","true");?

and here is the html

?<input type="checkbox" name="priv"????????????????????????????? value="1"?????????????????/>
<input type="checkbox" name="priv" value="2"/>
<input type="checkbox" name="priv" value="3"/>
<input type="checkbox" name="priv" value="4"/>
<input type="checkbox" name="priv" value="5"/>
<input type="checkbox" name="priv" value="6"/>
<input type="checkbox" name="priv" value="7"/>
 <input type="checkbox" name="priv" value="8"/>?

here's a demo of the problem

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about checkbox