Hi,
> And for those lazy sods out there how about:
>
> $.quickMethods({
> bind: ['click'],
> attr: ['val','href','title'],
> css: ['display','height','width']
> });
That is a really great idea :-) I think for something so usefull we should
chose a shorter Function-name:
$.fn.q = function(o) {
for( var n in o ) this[n].apply(this,o[n]);
return this;
}
$('.myclass').q({
onclick: [function() {...}],
addClass: ['asdf']
}).filter('.myOtherClass').q({
removeClass['asdf'],
onmouseover(function() {...})
});
I like the idea of using onclick, onload, etc. better than always having to
use bind(). These Event-Functions are just small wrappers around bind() which
are - IIRC - created in a loop. I wouldn't expect that jQuery gets much
smaller when they are removed and they are handy shortcuts.
Christof
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/