I want to have an image drop-down in which each images are stored in each option field.This must work in chrome.
-
And what you have tried so far? – Rahul Tripathi Aug 05 '14 at 05:16
-
I have tried this - http://www.marghoobsuleman.com/jquery-image-dropdown. As it is shwing images in span I can't save the value into database. – user3004403 Aug 05 '14 at 05:22
-
possible duplicate of [Dropdown select with images](http://stackoverflow.com/questions/9508029/dropdown-select-with-images) – jww Aug 05 '14 at 05:53
1 Answers
You Can Use wSelect to add icons or images to select box options
Support : Chrome, IE7+, FireFox, Opera, Safari
wSelect is a fast and lightweight jQuery plugin which turns the default html select elements into customizable and clean looking select boxes with some themes and options. wSelect also allows you to add icons to your select options using data-icon attribute. How to use it:
Include jQuery library and jQuery wSelect on your web page
Include required jQuery wSelect CSS to style the select elements
Create a html select box.
Select a CountryAustralia Canada Poland Thailand England (United Kingdom)
The javacript
$('select').wSelect(); $('#demo').change(function() { console.log($(this).val()); }); $('#demo').val('AU').change(); // should see in console $('#demo').val('PL').wSelect('change'); // should see the selected option change to three $('#demo').append('United States of America').wSelect('reset'); $('#demo').val('CA').change();More options
$.fn.wSelect.defaults = { theme: 'classic', // theme size: '4', // default number of options to display (overwrite with
size
attr onselect
element) labelPosition: 'left', // set position for label (left,top) highlight: true // highlight fields when selected };
Reference : http://www.jqueryscript.net/form/Customizable-jQuery-Select-Box-Replacement-Plugin-wSelect.html
Also you can use iconselet http://bug7a.github.io/iconselect.js/

- 1,465
- 1
- 9
- 12