Opened 13 years ago
Closed 12 years ago
#2141 closed enhancement (wontfix)
Make shortcut syntax for the focus and the blur event
Reported by: | DarkAngelBGE | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.2.4 |
Component: | event | Version: | 1.2.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Possible usage:
$obj.focus(
function() {}, for focus event function() {} for blur event
);
Something like:
(function($) {
var _focus = $.fn.focus; $.fn.focus = function(focus, blur) {
_focus.call(this, focus); if (blur) {
this.blur(blur);
}
};
}(jQuery));
not tested
This is really like the .hover(callback, callback) thing :)
Change History (3)
comment:1 Changed 13 years ago by
Component: | interface → event |
---|---|
Owner: | stefan deleted |
comment:2 Changed 13 years ago by
Milestone: | 1.2.2 → 1.2.4 |
---|---|
need: | Review → Test Case |
comment:3 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Going to leave this to a plugin unless it becomes wildly popular.
Note: See
TracTickets for help on using
tickets.
Could you a consistent test case where this is useful ?