page[:comment_form].disable then later on I was enabling it with
page[:comment_form].enable.
Not sure if this is the best way to add the functionality as I'm new to
rails and even newer to jquery.
Patch is attached to the email.
--
Greg Fitzgerald
> --- jrails.js 2008-09-14 15:32:29.000000000 -0400
> +++ /home/gregf/myjrails/javascripts/sources/jrails.js 2008-09-14 15:31:51.000000000 -0400
> @@ -175,6 +175,12 @@
> },
> switchOn : function(speed, callback) {
> return this.show('clip', {}, speed, callback);
> - }
> + },
> + disable : function(callback) {
> + return this.attr('disabled', 'true', callback);
> + },
> + enable : function(callback) {
> + return this.attr('enabled', 'true', callback);
> + }
> });
> })(jQuery);
Shoot, just realized after I sent this according to the jquery docs attr
does not have a callback. So that should be taking out of the patch.
--
Greg Fitzgerald