Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery select2 remove arrow like multiselect input

I'm using last version of select2 plugin (4.0.2) and I'd like to remove arrow from my single select like multiselect input style. I tried to edit the css where there are arrow's element but without success. Can someone tell me how can I do? Thank you

like image 622
Gus Avatar asked Oct 24 '25 04:10

Gus


2 Answers

Do you want just to remove the arrow?

try this:

$('b[role="presentation"]').hide();
like image 151
Emanuel Ricardo Gonçalves Avatar answered Oct 25 '25 18:10

Emanuel Ricardo Gonçalves


You can add this before closing the head tag on your page.

<style>
.select2-selection__arrow b{
    display:none !important;
}
</style>

This will not screw up anything like width and all. It just won't show that arrow.

like image 38
Vaibhav Tomar Avatar answered Oct 25 '25 16:10

Vaibhav Tomar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!