Why am I unable to create an alert when a button is disabled. But when the button is enabled I can get the alerts?
$(document).on('click', '#printpage', function() {
alert('clicked');
if ($("#printpage").is(":disabled")) {
alert("Disabled");
} else {
alert("enabled");
}
});