{"id":54,"date":"2023-08-25T17:39:27","date_gmt":"2023-08-25T17:39:27","guid":{"rendered":"\/\/api.jqueryui.com\/1.11\/?p=54"},"modified":"2023-08-25T17:39:27","modified_gmt":"2023-08-25T17:39:27","slug":"focus","status":"publish","type":"post","link":"https:\/\/api.jqueryui.com\/1.11\/focus\/","title":{"rendered":".focus()"},"content":{"rendered":"<article id=\"focus1\" class=\"entry method\"><h2 class=\"section-title\">\n<span class=\"name\">.focus( delay [, callback ] )<\/span><span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#jQuery\">jQuery<\/a><\/span>\n<\/h2>\n<div class=\"entry-wrapper\">\n<p class=\"desc\"><strong>Description: <\/strong>Asynchronously set focus to an element.<\/p>\n<ul class=\"signatures\"><li class=\"signature\">\n<h4 class=\"name\">\n<span class=\"version-details\">version deprecated: 1.11<\/span><a id=\"focus-delay-callback\" href=\"#focus-delay-callback\"><span class=\"icon-link\"><\/span>.focus( delay [, callback ] )<\/a>\n<\/h4>\n<ul>\n<li id=\"focus-delay-callback-delay\">\n<div><strong>delay<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Integer\">Integer<\/a>\n<\/div>\n<div>The number of milliseconds to wait before setting focus.<\/div>\n<\/li>\n<li id=\"focus-delay-callback-callback\">\n<div><strong>callback<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>()<\/div>\n<div>A function to invoke after the element has been focused.<\/div>\n<\/li>\n<\/ul>\n<\/li><\/ul>\n<div class=\"longdesc\" id=\"entry-longdesc\">\n\t\t<p>This plugin extends jQuery&apos;s built-in <a href=\"\/\/api.jquery.com\/focus\/\"><code>.focus()<\/code><\/a> method. If jQuery UI is not loaded, calling the <code>.focus()<\/code> method may not fail directly, as the method still exists. However, the expected behavior will not occur.<\/p>\n\t\t<p class=\"warning\">This method is deprecated. Use <code>.focus()<\/code> without arguments inside a timeout or <a href=\"\/1.11\/jQuery.widget\/#method-_delay\">$.Widget&apos;s <code>._delay()<\/code><\/a> method.<\/p>\n\t<\/div>\n<\/div><\/article>","protected":false},"excerpt":{"rendered":"<p>Asynchronously set focus to an element.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,6,9],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-overrides","category-methods","category-ui-core"],"_links":{"self":[{"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":1,"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":55,"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/posts\/54\/revisions\/55"}],"wp:attachment":[{"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.11\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}