Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery UI API – .focus()

jQuery UI API - .focus()

Category

Method Overrides | Methods | UI Core

Usage

**Description:** Focus an element asynchronously.

Returns:jQuery

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

Parameters Type Description
delay Integer The number of milliseconds to wait before focusing.
callback Function() A function to call after the element has been focused.

This plugin extends jQuery's built-in .focus() method. If jQuery UI is not loaded, calling the .focus() method does not fail directly, because the method exists in jQuery. However, the expected behavior will not occur.