Set focus on the first text field:
$("input:text:visible:first").focus();
This also does the first text field, but you can change the [0] to another index:
$('input[@type="text"]')[0].focus();
Or, you can use the ID:
$("#someTextBox").focus();
More Related Contents:
- How to scroll to an element in jQuery?
- PLEASE assist me.. RE: *FORM FIELDS* I want to Hide() my "type=text box" until the Other option is chosen in the dropdown option
- How to hide css and js version details from weppalyzer in PHP
- How do I pass a URL as a parameter? [closed]
- .index() only for one instance of class [closed]
- Dynamic page load can’t load Java with page
- How to scroll an HTML page to a given anchor
- Why I have to put all the script to index.html in jquery mobile
- Replacing css file on the fly (and apply the new style to the page)
- How to reload current page without losing any form data?
- How to include multiple js files using jQuery $.getScript() method
- Prevent Page Load on Jquery Form Submit with None Display Button
- Benefits of loading JS at the bottom as opposed to the top of the document
- Call javascript function after script is loaded
- Dynamically loading css stylesheet doesn’t work on IE
- How can I detect whether an iframe is loaded?
- jquery submit form and then show results in an existing div
- Can I use javascript to dynamically change a video’s source?
- jQuery – How to select by attribute
- time delayed redirect?
- HTML 5 – Play file at certain time point
- Bootstrap 4 multiselect dropdown
- how to resolve iframe cross domain issue [duplicate]
- How to get the html of a div on another page with jQuery ajax?
- Waiting for dynamically loaded script
- Calculate Position of selected text javascript/JQuery?
- How do I refresh a DIV content?
- Get content of span
- How to get an element by its href in jquery?
- Keep tabbing within modal pane only