Update docs to show new data-placeholder attribute support and blank option requirement.

gh-pages
Patrick Filler 2011-07-29 11:33:31 -04:00
parent 67ba16b47d
commit 39a5ef7ec6
1 changed files with 4 additions and 2 deletions

View File

@ -46,6 +46,7 @@
<div>
<em>Turns This</em>
<select title="Choose a Country" style="width:350px;" tabindex="1">
<option value=""></option>
<option value="United States">United States</option>
<option value="United Kingdom">United Kingdom</option>
<option value="Afghanistan">Afghanistan</option>
@ -1190,8 +1191,9 @@
<h2>Default Text Support</h2>
<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>
<code>&lt;select <strong>title="Choose a country..."</strong> style="width:350px;" multiple class="chzn-select"&gt;</code>
<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>&lt;select data-placehoder="Choose a country..." style="width:350px;" multiple class="chzn-select""&gt;</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>
<h2>Change / Update Events</h2>