I figured this out. Need to put the disabling code inside a setTimeout
callback e.g.:
$('foo').button('reset');
// We need to push this to the event loop to allow the button reset
above
// to complete.
setTimeout(function () {
$('foo').attr('disabled', 'disabled');
}, 0);
On Thursday, September 27, 2012 5:07:10 PM UTC-4, Reuben Avery wrote:
>
> Hello all,
>
> I have a use case where I'm wanting to disable a button at the same time I
> reset it, but having no luck due to the reset operation being animated.
> e.g., the 'disabling' in $('foo').button('reset').attr('disabled',
> 'disabled') doesn't stick.
>
> Is there a 'reset' event or something like that I can bind on to?
>
> Many thx,
> ~R
>