Bhawna Malhotra Bhawna Malhotra - 1 year ago 108
jQuery Question

Adding property disabled not working

I have to disable a button on click.Using below code but its not working.
Below code is using jquery

$('#someid').prop('disabled', true);

Any solution?

Answer Source

Property and attribute have different behaviours. See here

Instead use

$('#someid').attr('disabled', true);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download