Skip to main content

Bug Tracker

Side navigation

#2141 closed enhancement (wontfix)

Opened January 10, 2008 02:21PM UTC

Closed May 04, 2009 04:56AM UTC

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 :)

Attachments (0)
Change History (3)

Changed March 31, 2008 02:23AM UTC by scott.gonzal comment:1

component: interfaceevent
owner: stefan

Changed May 16, 2008 02:52AM UTC by flesler comment:2

milestone: 1.2.21.2.4
need: ReviewTest Case

Could you a consistent test case where this is useful ?

Changed May 04, 2009 04:56AM UTC by brandon comment:3

resolution: → wontfix
status: newclosed

Going to leave this to a plugin unless it becomes wildly popular.