Get checkbox with specific value
- by PalAla
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