I had this working previously but for some reason it has stopped working, a syntax error I presume. Can anyone spot the issue?
I have had it running with the html inserted into the source on a browser and Jquery in a console. But not in JSFiddle and a few other options.
It should prompt when ticked and prompt again if unticked:
<td class="icon">
<input type="checkbox" id="my_checkbox">
</td>
$("#my_checkbox").click(function() {
if (this.checked) {
this.checked = confirm('Are you sure you want to CONFIRM the order and EMAIL THE CUSTOMER?');
}
else {
this.checked = !confirm('Do you really want to change this to NOT RECEIVED?');
}
});
Aucun commentaire:
Enregistrer un commentaire