How to make select with thumbnails (small images) instead of text? I tried several plug-ins like jquery-form-styler or nice-select , neither the one nor the other image is displayed, tell me how can this be realized?

    1 answer 1

    From ready-made plugins, I can advise Chosen + Image Select .

    Code from tutorial:

    $(function() { $(".my-select").chosen(); }); 
     <select class="my-select"> <option data-img-src="img/adnan.png">Adnan Sagar</option> <option data-img-src="img/rena.png">Rena Cugelman</option> <option data-img-src="img/tavis.png">Tavis Lochhead</option> <option data-img-src="img/brian.png" selected="selected">Brain Cugelman</option> </select> 

    As a result, as far as I remember, inside the option to select, an image is created with the URL that is specified in data-img-src .

    • @VostokSisters adding jquery here will not make the snippet work, there will have to connect a lot more, so I didn’t insert it intentionally. - Sasha Omelchenko