If you grab the latest version of jQuery (1.0.3) or event better from
SVN, then you will be able to use .attr() to set the disabled
attribute and you will be able to just use .css() to set the opacity -
even in IE. Actually the opacity should work with 1.0.2.
The issue of the button not being re-enabled ... I'm wondering if the
enable method even gets fired. Does the button fade back to 100%
opacity? I noticed you base which method runs (enable vs disable) on a
check for a class name. I believe there might have been some issues
with earlier releases of class names and IE and an upgrade might fix
this issue as well.
--
Brandon Aaron
On 11/29/06, Brice Burgess <[EMAIL PROTECTED]> wrote:
> As part of a client side validation library I "disable" and "enable" the
> submit element (generally a jQ object referencing a single <button> or
> <input>) depending on the state of form elements. This seems to work
> well in Mozilla. In IE(6) my routine disables the submit element, but
> never re-enables it!
>
>
> Here's my code -->
>
> ---
> disable: function() {
> if (!this.submit)
> return;
>
> this.submit[0].disabled = true;
> this.submit.fadeTo(1,0.5);
> },
> enable: function() {
> if (!this.submit)
> return;
>
> this.submit[0].disabled = false;
> this.submit.fadeTo(1,1);
> },
> ---
>
> I have tried using $.attr('disabled',true); and
> $.attr('disabled',false); -- these don't seem to work even in Moz
> (never disables the submit element on submit.attr('disabled',true));
>
> I'm using jQ 1.0.2 rev 501.
>
> Any ideas?
>
> Thanks!
>
> ~ Brice
>
> ps -> the validation library [OLDER VERSION] can be found;
> http://dev.iceburg.net/jquery/tableEditor/validate.js
>
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/