Update docs to show new data-placeholder attribute support and blank option requirement.
This commit is contained in:
parent
67ba16b47d
commit
39a5ef7ec6
|
@ -46,6 +46,7 @@
|
||||||
<div>
|
<div>
|
||||||
<em>Turns This</em>
|
<em>Turns This</em>
|
||||||
<select title="Choose a Country" style="width:350px;" tabindex="1">
|
<select title="Choose a Country" style="width:350px;" tabindex="1">
|
||||||
|
<option value=""></option>
|
||||||
<option value="United States">United States</option>
|
<option value="United States">United States</option>
|
||||||
<option value="United Kingdom">United Kingdom</option>
|
<option value="United Kingdom">United Kingdom</option>
|
||||||
<option value="Afghanistan">Afghanistan</option>
|
<option value="Afghanistan">Afghanistan</option>
|
||||||
|
@ -1190,8 +1191,9 @@
|
||||||
|
|
||||||
<h2>Default Text Support</h2>
|
<h2>Default Text Support</h2>
|
||||||
<div class="side-by-side clearfix">
|
<div class="side-by-side clearfix">
|
||||||
<p>Chosen automatically sets the default field text ("Choose a country...") by reading the select element's title value. If no title value is present, it will default to "Select Some Option" or "Select Some Options" depending on whether the select is single or multiple. You can change these elements in the plugin js file as you see fit.</p>
|
<p>Chosen automatically sets the default field text ("Choose a country...") by reading the select element's data-placeholder value. If no data-placeholder value is present, it will default to "Select Some Option" or "Select Some Options" depending on whether the select is single or multiple. You can change these elements in the plugin js file as you see fit.</p>
|
||||||
<code><select <strong>title="Choose a country..."</strong> style="width:350px;" multiple class="chzn-select"></code>
|
<code><select data-placehoder="Choose a country..." style="width:350px;" multiple class="chzn-select""></code>
|
||||||
|
<p style="margin-top: 1em;"><strong>Note:</strong> on single selects, the first element is assumed to be selected by the browser. To take advantage of the default text support, you will need to include a blank option as the first element of your select list.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Change / Update Events</h2>
|
<h2>Change / Update Events</h2>
|
||||||
|
|
Loading…
Reference in a new issue