I want to disable control on click for this i have added attr to the control 'disabled' and it is working fine in IE but not in Firefox. The code i have written is
$(obj).attr('disabled','disabled');
If I am missing something then please give me idea.
Checking if the button is disabled or enabled with jQuery removeAttr('disabled'); }; const checkButton = (e) => { const isDisabled = $('#my-button'). prop('disabled'); if( isDisabled ){ alert("Is disabled!"); } else{ alert("Is enabled"); } }; $(document).
To disable all form elements inside 'target', use the :input selector which matches all input, textarea, select and button elements. $("#target :input"). prop("disabled", true); If you only want the elements, use this.
$(obj).attr('disabled', true);
Try this
$(obj).attr("disabled","disable")
note value of attribute "disabled" is "disable" not "disabl*ed*"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With