Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

theodorejb
Copy link
Contributor

Added an input option to auto-focus the search field.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using jQuery, we would generally use the prop function rather than the attr function for this. Also, the $search element is already a jQuery element, so it doesn't need to be re-wrapped. Probably instead use something like:

$search.prop('autofocus', true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants