It can handle both single and multi-select options. The text to be displayed as a placeholder when no options are selected for a select. val (); return this. multiple: The attribute multiple on your select box dictates whether Chosen will render a multiple or single select. function: The jQuery attr() method is also used to set/change attribute values. Note: The chosen-rtl class will pass through to the Chosen select even when the inherit_select_classes option is set to false. It’s basically just prepend any identifier with “data-” and don’t include quotes on booleans. Note: all custom Chosen events (those that begin with chosen:) also include the chosen object as a parameter. When this method is used to return the attribute value, it returns the value of the FIRST matched element.. Certain attributes placed on the select tag or its options can be used to configure Chosen. form_field); this. Note:This attribute overrides anything set in the placeholder_text_multiple or placeholder_text_single options. parameters: the index of the current element in the list of elements selected Note: This is deprecated in favor of using the rtl: true option (see the Options section). Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. Tags

When this method is used to return the attribute value, it returns the value of the FIRST matched element. The text to be displayed as a placeholder when no options are selected for a select. To set default text on single option element to its native form.

When this method is used to return the attribute value, it returns the value of the FIRST matched element. By default, Chosen’s search matches starting at the beginning of a word.

I created a jQuery.Data() jsFiddle for you to play around with the data attributes and do some testing. Write powerful, clean and maintainable JavaScript.RRP $11.95. Setting this option to false will hide disabled results and exclude them from searches. Note: the chosen-rtl class on the select has precedence over this option.

Note:This attribute overrides anything set in the placeholder_text_multiple or placeholder_text_single options. Triggered after Chosen has been fully instantiated. Chosen supports right-to-left text in select boxes. Set this to, By default, pressing delete/backspace on multiple selects will remove a selected choice. new attribute value from the function. In the example, I have created one single and multiple options elements,