$.quickMethods({
bind: ['click'],
attr: ['val','href','title'],
css: ['display','height','width']
});
is sexy. similar to the perl use with parameters.
I can also envision $.quickMethods('all') and even
$.quickMethods(['all','log'])
(for the juniors among us -- me!)
what about a method called use(listofgeneratedroutines) which can whip
up all the normal methods that we all... sometimes.. use.
On 10/16/06, Mark Gibson <[EMAIL PROTECTED]> wrote:
> Jörn Zaefferer wrote:
> > If we go back to the roots and stick to bind(), unbind(), trigger(),
> > attr() and css(), we could remove all those events and html and css
> > attribute shortcut methods, greatly reducing the number of methods. By
> > adding those methods, or rather only parts of it, like click(), back via
> > plugins, the jQuery meat could be reduced to some extend, maybe even
> > reducing the barrier for newcomers by simplifying the API docs.
> > bind(), unbind(), trigger() and attr() could be improved to a hash as
> > css() alread does, allowing you to set several attributes at once or
> > adding/removing several events with one method call. Passing a hash
> > without values to attr could be quite sexy, too, when it simply fills
> > the hash with all available values.
> >
> > Your ideas and opinions, please!
>
> Aye, aye.
>
> How much harder is it really to use:
> $(...).bind('click', function() {...});
> than:
> $(...).click(function() {...});
>
> and
> $(...).bind({
> click: function() {...},
> change: function() {...},
> });
>
> sounds quite nice too.
>
> And for those lazy sods out there how about:
>
> $.quickMethods({
> bind: ['click'],
> attr: ['val','href','title'],
> css: ['display','height','width']
> });
>
> and .click(), .val(), etc. are instantly restored.
> You get the idea ;P
>
> While we're on the API:
> I really don't like the method name .css(), as its actual
> operation is to change a style property, and doesn't really
> have much directly to do with Cascading Style Sheets.
> Could it not be .style() instead?
>
> - Mark.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/