Я хочу использовать jQuery для установки атрибута checked
Как это можно сделать?
var arr = new Array(1, 2, 3);
<input type="checkbox" name="chk" value="1"/>
<input type="checkbox" name="chk" value="2"/>
<input type="checkbox" name="chk" value="3"/>
<input type="checkbox" name="chk" value="4"/>
<input type="checkbox" name="chk" value="5"/>
<input type="checkbox" name="chk" value="6"/>
<input type="checkbox" name="chk" value="7"/>
Я хочу найти значение arr eq в флажке ...
<input type="checkbox" name="chk" value="1" checked/>
<input type="checkbox" name="chk" value="2" checked/>
<input type="checkbox" name="chk" value="3" checked/>
<input type="checkbox" name="chk" value="4"/>
<input type="checkbox" name="chk" value="5"/>
<input type="checkbox" name="chk" value="6"/>
<input type="checkbox" name="chk" value="7"/>