Is there a way to check an unchecked check box by just getting its ID?
I have many jquery checkboxes and I just want to know if its possible that by just inputing its ID in a textbox, it will go through all my checkbox using each and, compare the inputed text and its ID… Then checked it if it is found.
Let’s just say that what i have in my html is a textbox, a number of checkboxes and button.
<div id = 'fCheck'>
<input type="checkbox" id="mango" value="mango" /> <label>MANGO</label><br>
<input type="checkbox" id="santol" value="santol" /> <label>SANTOL</label><br>
<input type="checkbox" id="guava" value="guava" /> <label>GUAVA</label><br>
<input type="checkbox" id="lomboy" value="lomboy" /> <label>LOMBOY</label><br>
<input type="checkbox" id="apple" value="apple" /> <label>APPLE</label><br>
<input type="checkbox" id="orange" value="orange" /> <label>ORANGE</label><br>
</div>
Any idea on how to do this? A demo will be greatly appreciated.
for those sticks in the mud who don’t want to use .prop I guess >.>