control-freak-ide/Control-Freak-Documentation/jQuery/docs/entries/focusin.json
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

1 line
1.5 KiB
JSON

{"name":"focusin","type":"method","title":".focusin()","deprecated":null,"removed":null,"desc":"Bind an event handler to the \"focusin\" event.","categories":["events/form-events","version/1.4","version/1.4.3"],"entries":[{"return":"jQuery","signatures":[{"added":"1.4","argument":{"desc":"A function to execute each time the event is triggered.","name":"handler(eventObject)","type":"Function"}},{"added":"1.4.3","argument":[{"desc":"An object containing data that will be passed to the event handler.","name":"eventData","type":"Object","optional":"true"},{"desc":"A function to execute each time the event is triggered.","name":"handler(eventObject)","type":"Function"}]}],"examples":{"desc":"Watch for a focus to occur within the paragraphs on the page.","css":"\n span {\n display: none;\n }\n","code":"\n$( \"p\" ).focusin(function() {\n $( this ).find( \"span\" ).css( \"display\", \"inline\" ).fadeOut( 1000 );\n});\n","html":"\n<p><input type=\"text\"> <span>focusin fire</span></p>\n<p><input type=\"password\"> <span>focusin fire</span></p>\n"},"longdesc":"\n <p>This method is a shortcut for <code>.on('focusin', handler)</code>.</p>\n <p>The <code>focusin</code> event is sent to an element when it, or any element inside of it, gains focus. This is distinct from the <a href=\"/focus/\">focus</a> event in that it supports detecting the focus event on parent elements (in other words, it supports event bubbling).</p>\n <p>This event will likely be used together with the <a href=\"/focusout/\">focusout</a> event.</p>\n "}]}