Andrea Ercolino schrieb:
dave.methvin wrote:
Then there is the classic ambiguity of .unload(). Does it call an onunload
handler, or does it unbind all onload handlers? There is no doubt with
.un(load) or .on(unload, fn) which are only a few characters longer.
OK. But I don't think that
Hi folks,
the discussion so far led to the conclusion to remove all those macros
for css() and attr(), eg. color() or val(). css() and attr() are already
quite flexible: Both allow you to get a single property, set a single
property or set a set of properties. I wonder if it would help to
On 27/11/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
Hi folks,
the discussion so far led to the conclusion to remove all those macros
for css() and attr(), eg. color() or val(). css() and attr() are already
quite flexible: Both allow you to get a single property, set a single
property or set
Sam Collett schrieb:
The problem with removing all the helper methods is that some are very
heavily used (especially val and click). While that may reduce
jQuery's file size, it will increase the size of many plugins and
pages that use jQuery.
The basic problem: The API cluttering. There
On 11/27/06, Sam Collett [EMAIL PROTECTED] wrote:
The problem with removing all the helper methods is that some are very
heavily used (especially val and click). While that may reduce
jQuery's file size, it will increase the size of many plugins and
pages that use jQuery.
In addition to what
On 11/27/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
Currently I favor an interface that looks like this:
$().bind(type of event, eventHandler, {amount: 5, data: additionalStuff})
$().trigger(type of event, {bubble: true, data: moreStuff});
This avoids any type checking of arguments and
Brandon Aaron schrieb:
I think I prefer the suggestion made by Dave Methvin of using on() and
un() instead of bind.
$().on('click')
$().un('click')
Thanks Brandon, just forgot to mention that.
Also maybe event.bind and event.trigger should have 'Data' appended to
the end to be more
Jörn Zaefferer wrote:
...
The big so far unsolved question: What should the API methods look like?
How to pass the additional data to the event handler?
Currently I favor an interface that looks like this:
$().bind(type of event, eventHandler, {amount: 5, data:
additionalStuff})
On 11/27/06, Andrea Ercolino [EMAIL PROTECTED] wrote:
I hope the event shortcuts will remain, like click( handler ) to bind and
click() to trigger.
They will stick around but in a compatibility plugin.
As for the bind style, I think the handler should always be the last
argument, because to
Andrea Ercolino schrieb:
I hope the event shortcuts will remain, like click( handler ) to bind and
click() to trigger.
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.
As
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
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 );
Event
The problem with removing all the helper methods is that
some are very heavily used (especially val and click).
While that may reduce jQuery's file size, it will increase
the size of many plugins and pages that use jQuery.
I don't think it will increase plugins or user code by more than a few
13 matches
Mail list logo