Witam mam taki o to kod
<html> <head> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <head> <body> <script> $(document).ready(function(){ $('.forecast').on('change', ':checkbox', function () { $(this).closest('tr').find('input:text').attr("disabled", !this.checked); }).find(':checkbox').change(); $("#selecctall").change(function(){ $(".forecast :checkbox").prop('checked', $(this).prop("checked")); if($('.forecast :checkbox').is(':checked')) { $(".forecast :text").prop('disabled', $(this).prop("disabled")); } else { $(".forecast :text").prop('disabled', $(this).prop("disabled", true)); alert('test'); } }); }); </script> <input type="checkbox" id="selecctall"/>Selecct All <table class="forecast"> <tr><td><input type="checkbox" /></td><td><input type="text" value="0" disabled="disabled" /></td></tr> <tr><td><input type="checkbox" /></td><td><input type="text" value="0" disabled="disabled" /></td></tr> <tr><td><input type="checkbox" /></td><td><input type="text" value="0" disabled="disabled" /></td></tr> <tr><td><input type="checkbox" /></td><td><input type="text" value="0" disabled="disabled" /></td></tr> <tr><td><input type="checkbox" /></td><td><input type="text" value="0" disabled="disabled" /></td></tr> </table> </body> </html>
I wszystko było by dobrze gdyby nie to ze po zaznaczeniu checkbox all i odznaczeniu blokuje mi ten checkbox
Zobaczyć można na
https://jsfiddle.net/vdkopec/m6L8nq94/2/
Proszę o pomoc