jquery - How to check all check boxes by checking one? -
i trying check check boxes when "selectall" check box selected
i have tried codes work still not working me.
when click on main check box nothing happens.
here have done far
<script> $(document).ready(function() { if( $('#selectall').is(':checked') ){ $.each($('input[name=activitie]'){ $('input[type=checkbox]').prop('checked', true) } } }); </script>
shameless self-promotion: there's jquery plugin that. in case, think trick:
$(function () { $('#selectall').checkall('input[type="checkbox"]'); });
without seeing markup, however, can't sure...
Comments
Post a Comment