Jörn Zaefferer wrote:
> 
> So far bind() would be on() and unbind() would be un(). The shortcuts 
> would be removed from the default distribution, but still available as a 
> compatibility plugin.
> 

Don't remove the shortcuts, please! They are very convenient for the events.
I can understand that css() and attr() can be enough. But click() as it is
now is Easy and Clear and Convenient. The unbind could be incorporated into
click() too, for example by using click( null ); 
http://www.nabble.com/jQuery-API-discussion-tf2463514.html#a6867849 as I
suggested before .


Jörn Zaefferer wrote:
> 
> How about this:
> var handler = function() { ... };
> $("div").bind("click", handler, {amount: 1});
> 
OK, it won't be so different after all, having the options at the bottom.


Jörn Zaefferer wrote:
> 
> But the empty object would be still be passed around, creating 
> unncessary overhead. The "default" is nothing, therefore you should at 
> least use null as the second argument. Still I don't like an API that 
> forces me to pass null around all the time.
> 
OK I've already given up on this. 
Anyway the default is not "nothing", I think it's "{amount: infinity}" for
events.

-- 
View this message in context: 
http://www.nabble.com/jQuery-1.1-API-improvements-%28macros%2C-events%29-tf2713203.html#a7566749
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to