Posts

Showing posts from February 21, 2016

Disable button in Twitter's Bootstrap

$ ( 'button' ). addClass ( 'disabled' ); // Disables visually $ ( 'button' ). prop ( 'disabled' , true ); // Disables visually + functionally $ ( 'input[type=button]' ). addClass ( 'disabled' ); // Disables visually $ ( 'input[type=button]' ). prop ( 'disabled' , true ); // Disables visually + functionally $ ( 'a' ). addClass ( 'disabled' ); // Disables visually $ ( 'a' ). prop ( 'disabled' , true ); // Does nothing   $ ( 'a' ). attr ( 'disabled' , 'disabled' ); // Disables visually