Documentation: Remove extraneous non-matching close tags: </code> and </p>
This commit is contained in:
parent
61973c4e52
commit
11cd18bd93
30
index.html
30
index.html
@ -487,7 +487,7 @@ function format(state) {
|
||||
<p>
|
||||
<input type="hidden" id="e5" style="width:300px"/>
|
||||
</p>
|
||||
<p>In order to take advantage of custom data loading Select2 should be attached to an <code>input type='hidden'</code> tag, otherwise data is parsed from <code>select</code>'s <code>option</code> tags.</code></p>
|
||||
<p>In order to take advantage of custom data loading Select2 should be attached to an <code>input type='hidden'</code> tag, otherwise data is parsed from <code>select</code>'s <code>option</code> tags.</p>
|
||||
</div>
|
||||
<div class="span8">
|
||||
<h3>Example Code</h3>
|
||||
@ -761,7 +761,7 @@ $("#e11_2")
|
||||
by separating them with a comma or a space. Try typing in the search field below and entering a space or a comma.</p>
|
||||
|
||||
<p><input type="hidden" id="e20" style="width:300px" value="brown"/></p>
|
||||
<p>Note that the separators are defined in the <a href="#doc-tokenSeparators">tokenSeparators</a> option.</code></p>
|
||||
<p>Note that the separators are defined in the <a href="#doc-tokenSeparators">tokenSeparators</a> option.</p>
|
||||
<p>Note that this example uses the built in <a href="#doc-tokenizer">tokenizer</a> function, but a custom one can be provided in the options.</p>
|
||||
</div>
|
||||
<div class="span8">
|
||||
@ -1230,7 +1230,7 @@ $(document).ready(function () {
|
||||
<tr><td>text</td><td>string</td><td>text of the option being matched.</td></tr>
|
||||
<tr><td>option</td><td>jquery object</td>
|
||||
<td>the <code>option</code> element we are trying to match. Only given when attached to <code>select</code>.
|
||||
Can be used to match against custom attributes on the <code>option</code> tag in addition to matching on the <code>option</code>'s text.</code></td></tr>
|
||||
Can be used to match against custom attributes on the <code>option</code> tag in addition to matching on the <code>option</code>'s text.</td></tr>
|
||||
<tr><td><returns></td><td>boolean</td><td><code>true</code> if search term matches the text, or <code>false</code> otherwise.</td></tr>
|
||||
</table>
|
||||
The default implementation is case insensitive and matches anywhere in the term:
|
||||
@ -1411,7 +1411,7 @@ $("#select").select2({
|
||||
<tr><td><returns></td><td>string (optional)</td><td>Returns the string to which the input of
|
||||
the search field should be set to. Usually this is the remainder, of any, of the string after
|
||||
the tokens have been stripped. If <code>undefined</code> or <code>null</code> is returned the
|
||||
input of the search field is unchanged.</code></td></tr>
|
||||
input of the search field is unchanged.</td></tr>
|
||||
</table>
|
||||
|
||||
The default tokenizer will only be used if the <code>tokenSeparators</code> and <code>createSearchChoice</code>
|
||||
@ -1441,9 +1441,9 @@ $("#select").select2({
|
||||
<td>Callback function that should be called with the <code>result</code> object. The result object:
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr><th>Parameter</th><th>Type</th><th>Description</th></tr>
|
||||
<tr><td>result.results</td><td>[object]</td><td>Array of result objects. The default renderers expect objects with <code>id</code> and <code>text</code> keys</code>. The <code>id</code> attribute is required</code>, even if custom renderers are used. The object may also contain a <code>children</code>key if hierarchical data is displayed. The object may also contain a <code>disabled</code> boolean property indicating whether this result can be selected.</td></tr>
|
||||
<tr><td>result.results</td><td>[object]</td><td>Array of result objects. The default renderers expect objects with <code>id</code> and <code>text</code> keys. The <code>id</code> attribute is required, even if custom renderers are used. The object may also contain a <code>children</code>key if hierarchical data is displayed. The object may also contain a <code>disabled</code> boolean property indicating whether this result can be selected.</td></tr>
|
||||
<tr><td>result.more</td><td>boolean</td><td><code>true</code>if more results are available for the current search term.</td></tr>
|
||||
<tr><td>results.context</td><td>object</td><td>A user-defined object that should be made available as the <code>context</code> parameter to the <code>query</code> function on subsequent queries to load more result pages for the same search term. See the description of <a href="#doc-query-options-context">options.context</code></a> parameter.</td></tr>
|
||||
<tr><td>results.context</td><td>object</td><td>A user-defined object that should be made available as the <code>context</code> parameter to the <code>query</code> function on subsequent queries to load more result pages for the same search term. See the description of <a href="#doc-query-options-context"><code>options.context</code></a> parameter.</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
@ -1602,7 +1602,7 @@ $("#select").select2({
|
||||
<div class="row">
|
||||
<div class="span12"><h3>val</h3></div>
|
||||
</div>
|
||||
<p>Gets or sets the selection. If the <code>value</code> parameter is not specified, the <code>id</code> attribute of the currently selected element is returned. If the <code>value</code> parameter is specified it will become the current selection.</code></p>
|
||||
<p>Gets or sets the selection. If the <code>value</code> parameter is not specified, the <code>id</code> attribute of the currently selected element is returned. If the <code>value</code> parameter is specified it will become the current selection.</p>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr>
|
||||
<th>Parameter</th><th>Type</th><th>Description</th>
|
||||
@ -1626,7 +1626,7 @@ $("#select").select2({
|
||||
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td>triggerChange (optional)</td><td>boolean</td><td>Whether or not a <code>change</code> event should be triggered. <code>false</code> by default.</code></td></tr>
|
||||
<tr><td>triggerChange (optional)</td><td>boolean</td><td>Whether or not a <code>change</code> event should be triggered. <code>false</code> by default.</td></tr>
|
||||
</table>
|
||||
<p><code>val</code> method invoked on a single-select with an unset value will return <code>""</code>, while a <code>val</code> method invoked on an empty multi-select will return <code>[]</code>.</p>
|
||||
|
||||
@ -1694,7 +1694,6 @@ $("#select").select2({
|
||||
<dt>added</dt><dd>The added element, if any - the full element object, not just the id.</dd>
|
||||
<dt>removed</dt><dd>The removed element, if any - the full element object, not just the id.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row zebra">
|
||||
@ -1702,27 +1701,23 @@ $("#select").select2({
|
||||
<h3>select2-opening</h3>
|
||||
<p>Fired before the dropdown is shown.</p>
|
||||
<p>The event listener can prevent the opening by calling <code>preventDefault()</code> on the supplied event object.</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<h3>select2-open</h3>
|
||||
<p>Fired after the dropdown is shown.</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row zebra">
|
||||
<div class="span12">
|
||||
<h3>select2-highlight</h3>
|
||||
<p>Fired when a choice is highlighted in the dropdown.</p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>val</dt><dd>The id of the highlighted choice object.</dd>
|
||||
<dt>object</dt><dd>The highlighted choice object.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -1730,13 +1725,11 @@ $("#select").select2({
|
||||
<h3>select2-selecting</h3>
|
||||
<p>Fired when a choice is being selected in the dropdown, but before any modification has been made to the selection.
|
||||
This event is used to allow the user to reject selection by calling <code>event.preventDefault()</code></p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>val</dt><dd>The id of the highlighted choice object.</dd>
|
||||
<dt>object</dt><dd>The choice object about to be selected.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -1744,7 +1737,6 @@ $("#select").select2({
|
||||
<h3>select2-clearing</h3>
|
||||
<p>Fired when a choice is being cleared in the dropdown, but before any modification has been made to the selection.
|
||||
This event is used to allow the user to reject the clear by calling <code>event.preventDefault()</code></p>
|
||||
</p>
|
||||
<p>For the clear button to be visible the <code>allowClear</code> option needs to be <code>true</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -1753,38 +1745,32 @@ $("#select").select2({
|
||||
<h3>select2-removing</h3>
|
||||
<p>Fired when a choice is about to be removed in the dropdown/input, but before any removal of the choice has been made.
|
||||
This event is used to allow the user to reject removal by calling <code>event.preventDefault()</code></p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>val</dt><dd>The id of the removing choice object.</dd>
|
||||
<dt>object</dt><dd>The choice object about to be removed.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row zebra">
|
||||
<div class="span12">
|
||||
<h3>select2-removed</h3>
|
||||
<p>Fired when a choice is removed or cleared.</p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>val</dt><dd>The id of the highlighted choice object.</dd>
|
||||
<dt>object</dt><dd>The highlighted choice object.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<h3>select2-loaded</h3>
|
||||
<p>Fired when query function is done loading the data and the results list has been updated</p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>items</dt><dd>data that was used to populate the results.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row zebra">
|
||||
|
@ -351,7 +351,7 @@ version: 2.1
|
||||
<p>
|
||||
<input type="hidden" id="e5" style="width:300px"/>
|
||||
</p>
|
||||
<p>In order to take advantage of custom data loading Select2 should be attached to an <code>input type='hidden'</code> tag, otherwise data is parsed from <code>select</code>'s <code>option</code> tags.</code></p>
|
||||
<p>In order to take advantage of custom data loading Select2 should be attached to an <code>input type='hidden'</code> tag, otherwise data is parsed from <code>select</code>'s <code>option</code> tags.</p>
|
||||
</div>
|
||||
<div class="span8">
|
||||
<h3>Example Code</h3>
|
||||
@ -865,9 +865,9 @@ $("#tags").select2({
|
||||
<td>Callback function that should be called with the <code>result</code> object. The result object:
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr><th>Parameter</th><th>Type</th><th>Description</th></tr>
|
||||
<tr><td>result.results</td><td>[object]</td><td>Array of result objects. The default renderers expect objects with <code>id</code> and <code>text</code> keys</code>. The <code>id</code> attribute is required</code>, even if custom renderers are used.</td></tr>
|
||||
<tr><td>result.results</td><td>[object]</td><td>Array of result objects. The default renderers expect objects with <code>id</code> and <code>text</code> keys. The <code>id</code> attribute is required, even if custom renderers are used.</td></tr>
|
||||
<tr><td>result.more</td><td>boolean</td><td><code>true</code>if more results are available for the current search term</td></tr>
|
||||
<tr><td>results.context</td><td>object</td><td>A user-defined object that should be made available as the <code>context</code> parameter to the <code>query</code> function on subsequent queries to load more result pages for the same search term. See the description of <a href="#doc-query-options-context">options.context</code></a> parameter.</td></tr>
|
||||
<tr><td>results.context</td><td>object</td><td>A user-defined object that should be made available as the <code>context</code> parameter to the <code>query</code> function on subsequent queries to load more result pages for the same search term. See the description of <a href="#doc-query-options-context"><code>options.context</code></a> parameter.</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
@ -926,7 +926,7 @@ $("#tags").select2({
|
||||
<div class="row">
|
||||
<div class="span12"><h3>val</h3></div>
|
||||
</div>
|
||||
<p>Gets or sets the selection. If the <code>value</code> parameter is not specified, the <code>id</code> attribute of the currently selected element is returned. If the <code>value</code> parameter is specified it will become the current selection.</code></p>
|
||||
<p>Gets or sets the selection. If the <code>value</code> parameter is not specified, the <code>id</code> attribute of the currently selected element is returned. If the <code>value</code> parameter is specified it will become the current selection.</p>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr>
|
||||
<th>Parameter</th><th>Type</th><th>Description</th>
|
||||
|
@ -500,7 +500,7 @@ function format(state) {
|
||||
<p>
|
||||
<input type="hidden" id="e5" style="width:300px"/>
|
||||
</p>
|
||||
<p>In order to take advantage of custom data loading Select2 should be attached to an <code>input type='hidden'</code> tag, otherwise data is parsed from <code>select</code>'s <code>option</code> tags.</code></p>
|
||||
<p>In order to take advantage of custom data loading Select2 should be attached to an <code>input type='hidden'</code> tag, otherwise data is parsed from <code>select</code>'s <code>option</code> tags.</p>
|
||||
</div>
|
||||
<div class="span8">
|
||||
<h3>Example Code</h3>
|
||||
@ -768,7 +768,7 @@ $("#e11_2")
|
||||
by separating them with a comma or a space. Try typing in the search field below and entering a space or a comma.</p>
|
||||
|
||||
<p><input type="hidden" id="e20" style="width:300px" value="brown"/></p>
|
||||
<p>Note that the separators are defined in the <a href="#doc-tokenSeparators">tokenSeparators</a> option.</code></p>
|
||||
<p>Note that the separators are defined in the <a href="#doc-tokenSeparators">tokenSeparators</a> option.</p>
|
||||
<p>Note that this example uses the built in <a href="#doc-tokenizer">tokenizer</a> function, but a custom one can be provided in the options.</p>
|
||||
</div>
|
||||
<div class="span8">
|
||||
@ -1265,7 +1265,7 @@ $(document).ready(function () {
|
||||
<tr><td>text</td><td>string</td><td>text of the option being matched.</td></tr>
|
||||
<tr><td>option</td><td>jquery object</td>
|
||||
<td>the <code>option</code> element we are trying to match. Only given when attached to <code>select</code>.
|
||||
Can be used to match against custom attributes on the <code>option</code> tag in addition to matching on the <code>option</code>'s text.</code></td></tr>
|
||||
Can be used to match against custom attributes on the <code>option</code> tag in addition to matching on the <code>option</code>'s text.</td></tr>
|
||||
<tr><td><returns></td><td>boolean</td><td><code>true</code> if search term matches the text, or <code>false</code> otherwise.</td></tr>
|
||||
</table>
|
||||
The default implementation is case insensitive and matches anywhere in the term:
|
||||
@ -1466,7 +1466,7 @@ $("#select").select2({
|
||||
<tr><td><returns></td><td>string (optional)</td><td>Returns the string to which the input of
|
||||
the search field should be set to. Usually this is the remainder, of any, of the string after
|
||||
the tokens have been stripped. If <code>undefined</code> or <code>null</code> is returned the
|
||||
input of the search field is unchanged.</code></td></tr>
|
||||
input of the search field is unchanged.</td></tr>
|
||||
</table>
|
||||
|
||||
The default tokenizer will only be used if the <code>tokenSeparators</code> and <code>createSearchChoice</code>
|
||||
@ -1496,9 +1496,9 @@ $("#select").select2({
|
||||
<td>Callback function that should be called with the <code>result</code> object. The result object:
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr><th>Parameter</th><th>Type</th><th>Description</th></tr>
|
||||
<tr><td>result.results</td><td>[object]</td><td>Array of result objects. The default renderers expect objects with <code>id</code> and <code>text</code> keys</code>. The <code>id</code> property is required</code>, even if custom renderers are used. The object may also contain a <code>children</code> key if hierarchical data is displayed. The object may also contain a <code>disabled</code> boolean property indicating whether this result can be selected.</td></tr>
|
||||
<tr><td>result.results</td><td>[object]</td><td>Array of result objects. The default renderers expect objects with <code>id</code> and <code>text</code> keys. The <code>id</code> property is required, even if custom renderers are used. The object may also contain a <code>children</code> key if hierarchical data is displayed. The object may also contain a <code>disabled</code> boolean property indicating whether this result can be selected.</td></tr>
|
||||
<tr><td>result.more</td><td>boolean</td><td><code>true</code>if more results are available for the current search term.</td></tr>
|
||||
<tr><td>results.context</td><td>object</td><td>A user-defined object that should be made available as the <code>context</code> parameter to the <code>query</code> function on subsequent queries to load more result pages for the same search term. See the description of <a href="#doc-query-options-context">options.context</code></a> parameter.</td></tr>
|
||||
<tr><td>results.context</td><td>object</td><td>A user-defined object that should be made available as the <code>context</code> parameter to the <code>query</code> function on subsequent queries to load more result pages for the same search term. See the description of <a href="#doc-query-options-context"><code>options.context</code></a> parameter.</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
@ -1689,7 +1689,7 @@ $("#e1").select2({
|
||||
<div class="row">
|
||||
<div class="span12"><h3>val</h3></div>
|
||||
</div>
|
||||
<p>Gets or sets the selection. If the <code>value</code> parameter is not specified, the <code>id</code> attribute of the currently selected element is returned. If the <code>value</code> parameter is specified it will become the current selection.</code></p>
|
||||
<p>Gets or sets the selection. If the <code>value</code> parameter is not specified, the <code>id</code> attribute of the currently selected element is returned. If the <code>value</code> parameter is specified it will become the current selection.</p>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr>
|
||||
<th>Parameter</th><th>Type</th><th>Description</th>
|
||||
@ -1713,7 +1713,7 @@ $("#e1").select2({
|
||||
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td>triggerChange (optional)</td><td>boolean</td><td>Whether or not a <code>change</code> event should be triggered. <code>false</code> by default.</code></td></tr>
|
||||
<tr><td>triggerChange (optional)</td><td>boolean</td><td>Whether or not a <code>change</code> event should be triggered. <code>false</code> by default.</td></tr>
|
||||
</table>
|
||||
<p><code>val</code> method invoked on a single-select with an unset value will return <code>""</code>, while a <code>val</code> method invoked on an empty multi-select will return <code>[]</code>.</p>
|
||||
|
||||
@ -1781,7 +1781,6 @@ $("#e1").select2({
|
||||
<dt>added</dt><dd>The added element, if any - the full element object, not just the id.</dd>
|
||||
<dt>removed</dt><dd>The removed element, if any - the full element object, not just the id.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row zebra">
|
||||
@ -1789,27 +1788,23 @@ $("#e1").select2({
|
||||
<h3>select2-opening</h3>
|
||||
<p>Fired before the dropdown is shown.</p>
|
||||
<p>The event listener can prevent the opening by calling <code>preventDefault()</code> on the supplied event object.</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<h3>select2-open</h3>
|
||||
<p>Fired after the dropdown is shown.</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row zebra">
|
||||
<div class="span12">
|
||||
<h3>select2-highlight</h3>
|
||||
<p>Fired when a choice is highlighted in the dropdown.</p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>val</dt><dd>The id of the highlighted choice object.</dd>
|
||||
<dt>object</dt><dd>The highlighted choice object.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -1817,13 +1812,11 @@ $("#e1").select2({
|
||||
<h3>select2-selecting</h3>
|
||||
<p>Fired when a choice is being selected in the dropdown, but before any modification has been made to the selection.
|
||||
This event is used to allow the user to reject selection by calling <code>event.preventDefault()</code></p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>val</dt><dd>The id of the highlighted choice object.</dd>
|
||||
<dt>object</dt><dd>The choice object about to be selected.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -1831,7 +1824,6 @@ $("#e1").select2({
|
||||
<h3>select2-clearing</h3>
|
||||
<p>Fired when a choice is being cleared in the dropdown, but before any modification has been made to the selection.
|
||||
This event is used to allow the user to reject the clear by calling <code>event.preventDefault()</code></p>
|
||||
</p>
|
||||
<p>For the clear button to be visible the <code>allowClear</code> option needs to be <code>true</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -1840,38 +1832,32 @@ $("#e1").select2({
|
||||
<h3>select2-removing</h3>
|
||||
<p>Fired when a choice is about to be removed in the dropdown/input, but before any removal of the choice has been made.
|
||||
This event is used to allow the user to reject removal by calling <code>event.preventDefault()</code></p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>val</dt><dd>The id of the removing choice object.</dd>
|
||||
<dt>object</dt><dd>The choice object about to be removed.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row zebra">
|
||||
<div class="span12">
|
||||
<h3>select2-removed</h3>
|
||||
<p>Fired when a choice is removed or cleared.</p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>val</dt><dd>The id of the highlighted choice object.</dd>
|
||||
<dt>object</dt><dd>The highlighted choice object.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<h3>select2-loaded</h3>
|
||||
<p>Fired when query function is done loading the data and the results list has been updated</p>
|
||||
</p>
|
||||
<p>The event object contains the following custom properties:
|
||||
<dl>
|
||||
<dt>items</dt><dd>data that was used to populate the results.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row zebra">
|
||||
|
Loading…
Reference in New Issue
Block a user