jQuery: How to check if button is disabled
You can use jQuery to trigger a button click from the client. In this certain situation, I needed to make sure the button was not disabled prior to clicking. In jQuery you can use the “is” function to check if the button is disabled like this:
<script type="text/javascript">
$(document).ready(function() {
if ($('#StartButton').is(':disabled') == false) {
$('#StartButton').click();
}
});
</script>
Technorati Tags: jQuery