Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 591 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 591 Bytes

Select2 - 'searchInputPlaceholder' option

Extends Select2 v4 plugin by adding an option to set a placeholder for the 'search' input field.

Demo

Demo available on JsFiddle.

Usage

Initialize the select2 plugin with the searchInputPlaceholder option.

$("select").select2({
    // options 
    searchInputPlaceholder: 'My custom placeholder...'
});

Setup

Include the script after Select2 main javascript file:

<script src="select2.js"></script>
<script src="select2-searchInputPlaceholder.js"></script>