Vote Up 0 Vote Down

jquery checkbox array selector

Jquery checkbox array selector not working

HTML portion :

  <input type="checkbox" name="findvalues[]" value="play" >Play
<input type="checkbox" name="findvalues[]" value="work" >Work


Jquery Portion :

$("input[name=findvalues[]]:checked").each(function (){
$("#knowncheckbox_"+$(this).val()).show();
});
flag
edited on 31/1/15

Answers


Vote Up 0 Vote Down
You have to use single quote in the jquery selector :

$("input[name='findvalues[]']:checked").each(function (){
$("#knowncheckbox_"+$(this).val()).show();
});
flag | link |

Your Answer

Login before answering

Login with facebook