Marco Marco - 14 days ago 5
Javascript Question

Bootstrap select not changing icon set

I am using this select js plugin. In the documentation it says that you can change the icons with adding data attributes to select tag. I did it like it is suggested in the docs:

<select name="position" class="selectpicker form-control" multiple data-max-options="2" data-iconBase="ion" data-tickIcon="ion-checkmark-round" required>


But the html that is being created with the select element still has glyphicon icon, so nothing gets rendered. Has anyone managed to change the icons in this package?

Answer

Please fix you data- attributes too data-icon-base="ion" and data-tick-icon="ion-checkmark-round"