Dropdownlist With Icons

Because the option-tag of a select allows no tags, this should be a css (or jquery solution).

I have tried with the options tag and css, but I can’t get it to work.




 //generated options

 <option value="option1" class="icon-list">Option1</option>

  ...




css like




option.icon-list{

    background-position: <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?;

    background-image: url("img/icon-list.png");

}



Is there an extension for a dropdownlist with icon support base on a jquery plugin?

http://designwithpc.com/Plugins/ddSlick#demo

Ok, thanks - looks nice.

But seems that I have to implement a Yii wrappper extension by myself…

Joblo, could you share your wrapper for ddslick?

grab any dropdown list code, and set icons in background using background property

I have used multipleselectbox to show bootstrap icons instead.

See:

Menubuilder EMBBootstrapIconProvider