jQuery multiple select option with image

依然范特西╮ 提交于 2019-12-10 16:55:32

问题


Is there a jQuery tool that allows me to create a downdown list with multiple selection ("SELECT" in HTML terms with multiple option enable) where I can have images in the list?

This is great: jQuery UI MultiSelect Widget but you can´t insert images This is algo a good chice: JavaScript image combobox but multiple selection doesn´t work


回答1:


This is the way to do it with Eric Hynds jQuery UI MultiSelect Widget

I also created a FIDDLE so you can see it in action :)

My detailed explanation can be found at:

jQuery UI Multiselect Widget With Images (Eric Hynds Version)

Using the alteration to the script which I explain in the StackOverflow thread above, You can then include images within the HTML option rows like this:

<option value="somevalue" image="yourimage.jpg" class="multSelktrImg">
normal visible text
</option>

The class is used to control positioning and size of the image for each row and is just added to your CSS file.




回答2:


This might help, .. it's a JQuery plugin built on top of Chosen. It's called Image Select and it supports Multiple and Single select modes.




回答3:


Take a look at jQuery Chosen plugin which I think might help you.

http://davidwalsh.name/jquery-chosen



来源:https://stackoverflow.com/questions/9047782/jquery-multiple-select-option-with-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!