Skip to content

Search field auto-focus#64

Open
theodorejb wants to merge 2 commits intoalfajango:masterfrom
theodorejb:autofocus-search-option
Open

Search field auto-focus#64
theodorejb wants to merge 2 commits intoalfajango:masterfrom
theodorejb:autofocus-search-option

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

Comments