> > I am not a fan of "bind" either, I'm sure it was inherited
> > from the other frameworks that use it. I would prefer .on()
> > and .un() (or perhaps .no()? ) because they're short and a
> > bit more intuitive.
>
> .on() sounds like a winner to me. Not sure about .un(), but I don't have a
> better idea - and .un() is certainly better than .no().
>
> > To me, click is a verb and it's not intuitive to be setting a
> > click handler with the word click.
>
> Same here. Especially when the function is overloaded so that .click()
> [with
> no args] *is* a verb, i.e. it triggers the click event. Nasty!
So what?
Rename bind() to on(), unbind() to un()? What about trigger? Leave it?
Would you rather screw shortcuts like click() completely? on("click", function)
isn't that much longer then click(function) anyway. It would help removing any
ambiguity: on("unload") is pretty clear, un("load") too.
With the above at hand, do we really need all those shortcuts or macrso
anymore? By using on(), un(), trigger(), css() and attr() the API is pretty
clean and easy to learn, and the different in necessary code to type is
minimal. And it's still extremely easy to write your own macros if needed.
--
Jörn Zaefferer
http://bassistance.de
--
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/