JSFiddle - React, Tailwind, and code Playground
HTML
<button type="button" id="the_button">Submit</button>
JavaScript
/* This code fires the click event even though the button is disabled. */
$("#the_button").button({
icons: {
primary: "ui-icon-disk"
},
disabled: true
}).live('click',function () {
alert('clicked');
});
/*
By changing it to .click() instead of .live('click'), it works as it should and does not fire the click event.
$("#the_button").button({
icons: {
primary: "ui-icon-disk"
},
disabled: true
}).click(function () {
alert('clicked');
});
*/