Ticket #5207 (closed feature: fixed)
Abstract event binding
| Reported by: | joern.zaefferer | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.9.0 |
| Component: | ui.widget | Version: | 1.8rc2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Something like this should be added in 1.9:
$.widget.prototype._bind = function(elements, handlers) {
if (!handlers) {
handlers = elements;
elements = this.element;
}
var self = this,
$.each(handlers), function(event, handler) {
elements.bind(event, function() {
if (!self.options.disabled) { return fn.apply(self, arguments); }
}
});
}
In addition, track all events bound (at least those bind to something else then element) and unbind them in destroy.
Change History
Note: See
TracTickets for help on using
tickets.


Branch for this ticket: http://github.com/jquery/jquery-ui/commits/bind
We shouldn't have merged 1.8.1 into that branch. Can't find the one commit to the branch...