brianleroux / xui

A tiny javascript framework for mobile web apps.
http://github.com/xui/xui
391 stars 159 forks source link

Suggestion: x$(selector).rmattr('attrname') #46

Closed Charles74 closed 13 years ago

Charles74 commented 13 years ago

First of all, great library, thanks a bunch. When dealing with disabled input boxes, such as button or submit, to enable them after they have been disabled a call to removeAttribute is required to remove the disabled attribute. After a call to removeAttribute the button is enabled. I added rmattr() to my local version, but I think other people might find it useful.

code: /* * Remove an attribute */ rmattr: function(attribute) { this.each(function(el) { el.removeAttribute(attribute); }); }

Thanks, Charles

remy commented 13 years ago

I think the usage is low enough that it makes sense either as a part of a plugin suite or in xui-more.

brianleroux commented 13 years ago

could be added to github.com/xui/xui-plugins