Skip to Content

initAutocompleteSearch()

Enable autocomplete search on core WordPress input field selectors.

JavaScript February 22, 2017

Usage

This function runs automatically, so it is not called manually. Is this incorrect?

Examples

Prevent autocomplete on a search field.

HTML
<input id="s" class="no-autocomplete" type="text" placeholder="Search this website..." />

Additional Notes

This function runs on all input fields with an ID of s or a class of search.

To prevent an autocomplete on a certain input, use the class no-autocomplete.

 

Source File

This function was not found in /assets/js/nebula.js. Please report this error.

Override

To override or disable this JavaScript function, simply redeclare it with the exact same function name.

JavaScript
function initAutocompleteSearch(){
    //Write your own code here, leave it blank, or return false.
}