Impossible to insert code

24 views
Skip to first unread message

Елена Ярыгина

unread,
Apr 20, 2016, 10:53:09 AM4/20/16
to select2
We would like to use plugin https://select2.github.io/examples.html 
But we can't  insert this code http://img.wolkow.ru/uzjerc5b1v.png 
Could you help if it is possible to do it?

Kevin Brown

unread,
Apr 21, 2016, 10:32:06 AM4/21/16
to select2
You may be interested in the `templateSelection` or `templateResult` options. You cannot place the HTML directly into the `<option>` tags, it's not allowed in the HTML specification, but Select2 does support templating so you can inject it later.


--
You received this message because you are subscribed to the Google Groups "select2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to select2+u...@googlegroups.com.
To post to this group, send email to sel...@googlegroups.com.
Visit this group at https://groups.google.com/group/select2.
For more options, visit https://groups.google.com/d/optout.

Елена Ярыгина

unread,
Apr 25, 2016, 6:19:24 AM4/25/16
to select2, ke...@kevin-brown.com
Thank you! It works.
And 2 more questions: if it is possible to apply different colours for part of select? We would like to realise this view of select http://joxi.ru/5mdQNL9cv5Rgd2 
And to make headlines.


четверг, 21 апреля 2016 г., 17:32:06 UTC+3 пользователь Kevin Brown написал:
Reply all
Reply to author
Forward
0 new messages