Make .delegate(null, 'type', fnHandler) behave like .bind('type', fnHandler)
|Reported by:||maranomynet||Owned by:|
Description (last modified by rwaldron)
There are circumstances where it would be incredibly handy if jQuery.fn.delegate would handle the special case of an empty/falsy selector parameter, and interpret it as a direct .bind() request on the collection.
The current behavior in jQuery happens to be almost like that, except that when the collection object is missing a selector property things start failing. I suspect there's some sort of a fallback on .live() going on - and causing those unpredictable results.
Adding this as a feature shouldn't add too much bloat to the core library, and would IMHO adhere to the principle of least surprise.
Change History (13)
comment:1 Changed 5 years ago by rwaldron
- Component changed from unfiled to event
- Status changed from new to open