Reputation: 31
I'm using bootstrap-select to create my selectpicker.
I set an icon for the select using :
data-style="glyphicon glyphicon-list"
When I'm selecting an option, the option selected is place near the icon but I don't want that. I don't want to see the selected option, only the icon.
Two printscreen to illustrate :
Before => http://hpics.li/07182fd
After => http://hpics.li/c1dd1ca
Thank you !
Upvotes: 2
Views: 1202
Reputation: 31
I found a way !
My code :
$('select.selectpicker').on('change', function(){
$(".glyphicon-list .filter-option.pull-left").empty();
});
glyphicon-list is the class of the button.btn.dropdown-toggle.selectpicker.
Upvotes: 1