Closed SimonErich closed 9 years ago
Hi SimonErich, thanks for this, .. I couldn't merge your request, can you do a pull and try again?
Hi, alright, I just looked at it and it interfered with klebervirgilio changes. But I found an even better solution that makes it possible to add images to optgroups as well, by not only using "chosen.form_field.options" but "$(chosen.form_field).find('optgroup, option')" to walk optgroups and options. Hope this helps
When using optgroup the images would be assigned to the wrong element, because of jquery selector. It also calculated the optgroups as key elements for "i". By using :not() we excluded the optgroup elements.