I am trying to use Selectize.js to handle a multi-select field in my form. When you select an option from the dropdown, it adds a selection to the select field , but only adds the data value. Does anyone know if there is an easy way to get Selectize to add the text from the option as well?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
Use the .getItem(value) method.
https://github.com/brianreavis/selectize.js/blob/master/docs/api.md#methods_options
Try here: http://jsfiddle.net/pzekurvp/5/