jQuery Chosen插件:在select中自定义/格式化选项文本 [英] jQuery Chosen plugin: customize/format text of option in select
问题描述
我在jquery中使用了一个插件,该插件被选中用于具有自动完成功能的选择框。
所以你可以从这里获得代码。
https://github.com/cjstewart88/chosen/tree/templates
I'm using a plugin in jquery called chosen for a select box with an autocomplete feature. http://harvesthq.github.com/chosen/
Where can I format the text of the options in the select box?
Is there a method in the chosen plugin for this? I've read the documentation and scanned the code but can't seem to find it.
Here is a screenshot of what I want to achieve. (this is made with another plugin 'selectmenu' but I want to do the same using 'chosen')
There is no such feature at master branch in current time.
But there is this pull-request, wich is immediately what you need (currently it's for jquery only): https://github.com/harvesthq/chosen/pull/692
So you can get code from here. https://github.com/cjstewart88/chosen/tree/templates
这篇关于jQuery Chosen插件:在select中自定义/格式化选项文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!