Latest web development tutorials

jQuery UI API - .focus ()


Method overloading (Method, Overrides) | method (in Methods) | the UI core (UI Core)


Description: Asynchronous focus to an element.

Returns: the jQuery

.focus( delay [, callback ] )Returns: jQuery

参数 类型 描述
delay Integer 聚焦前等待的毫秒数。
callback Function() 元素被聚焦后要调用的函数。

The plug-in extensions from jQuery built .focus () method. If jQuery UI is not loaded, call .focus() method does not simply fail, because the method exists in jQuery. But it is not expected behavior.