Toggle disabled property using jQuery's prop() doesn't work

jquery

Solution

Instead of

.removeProp('disabled')

use

.prop('disabled',false)

Fiddle: http://jsfiddle.net/kqnZz/6/

Problem

First, the fiddle. ``` $('#enableButtonB').click(function (e) { if($(e.target).is(':checked')) { $('#myButtonB').removeProp('disabled'); alert('Enable Button B'); } else { $('#myButtonB').prop('disabled', true); alert('Disable Button B'); } }); ``` I'm trying to use jQuery's `.prop()` and `removeProp()` methods to enable and disable a button based on some criteria. It seems to work fine until `removeProp()` is called on the element. After that any subsequent calls to `prop()` fail to disable to button. What's the proper way to enable and disable an element repeatedly?

Original source