Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

select add placeholder

//The Javascript
$('select').select2({
    minimumResultsForSearch: -1,
    placeholder: function(){
        $(this).data('placeholder');
    }
});
//Add this in HTML
<select data-placeholder="Your Placeholder" multiple>
    <option></option> 
    <option>Value 1</option>
    <option>Value 2</option>
    <option>Value 3</option>
    <option>Value 4</option>
    <option>Value 5</option>
</select>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #add #placeholder
ADD COMMENT
Topic
Name
5+9 =