websemantics / Image-Select

Image Select is an extension of Chosen, a jQuery plugin that makes long, unwieldy select boxes much more user-friendly. It provides image support for Single and Multi select HTML tags.
http://websemantics.github.io/Image-Select
MIT License
147 stars 44 forks source link

Using custom template-styling not getting coped to the dropdown values #39

Closed RachitaJain6 closed 7 years ago

RachitaJain6 commented 7 years ago

Hi, First of all I would like to thank you for providing such an awesome solution for having images with the chosen.

I am trying to place the image to the right of the text but I dont want the whole text also to move towards right. So if i am adding class as chosen-rtl, that is also moving the text towards right. So in order to achieve what i want, I went ahead and used custom template, and worked good except for one this which is that the style that I am giving only gets applied to the chosen-single span and not to chosen-results li. Please help to solve this problem as I want the selection as well the options to look similar. The code that i used is this view.$el.find('select').chosen({width:view.width, disable_search_threshold: 10, html_template: '{text} ' });

and the output looks like this: image

Please observe the margin-left that I have given in the template

websemantics commented 7 years ago

Thanks for your comment, this should fix it :)