Note that there are some explanatory texts on larger screens.

plurals
  1. POdisabling the button and uncheck the checkbox using jquery
    text
    copied!<p>What I am trying to do is I added two buttons which are disabled by default.when I add an item the buttons will enable once I click receipt button the checkbox checked should go away which is working in my laptop but not in fiddle and also if i click receipt it should the removeAttr checked to the check box and the buttons should disable because no checkbox is checked..here is my code <a href="http://jsfiddle.net/M8MHc/8" rel="nofollow">JSFIDDLE</a></p> <p>Javascript:</p> <pre><code>// json data object var data = JSON.parse('{ "122233334444": ["Book","Three Musketters","DE7598490587","7584092043857", "03/18/13 11:17:51 AM","03/18/13 11:17:51 AM", "1" ], "122223355552":["eBook","Fall Colors","XYZ29494949","7584092043857", "03/18/13 11:17:51 AM","03/18/13 11:17:51 AM", "2" ], "122223355533":["eBook","Snowfall","XYZ29494949","7584092043857", "03/18/13 11:17:51 AM","03/18/13 11:17:51 AM", "3" ] }'); $("#submitid").click(function () { $('#resend').removeAttr('disabled'); $('#receipt').removeAttr('disabled'); var rowId = $("#number").val(); $("#number").val(""); var rowData = data[rowId]; if (rowData) { var tr = $("&lt;tr&gt;&lt;td&gt;&lt;input id='item-id' type='checkbox' checked/&gt;&lt;/td&gt;&lt;/tr&gt;").attr("id", "datatable-row-" + rowId); for (var col = 0; col &lt; rowData.length; col++) tr.append($("&lt;td&gt;&lt;/td&gt;").text(rowData[col])); $("#datatable").prepend(tr); $("#datatable").show(); } else { alert("Row doesn't exist in json object: " + rowId); } }); $('#receipt').click(function () { $('#item-id').removeAttr('checked'); $('#resend').attr('disabled'); $('#receipt').attr('disabled'); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload