Documentation: Fix typos
This commit is contained in:
parent
44d1eab55f
commit
61973c4e52
14
index.html
14
index.html
@ -390,7 +390,7 @@ $("#e10_4").select2({
|
|||||||
<article class="row" id="multi">
|
<article class="row" id="multi">
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<h3>Multi-Value Select Boxes</h3>
|
<h3>Multi-Value Select Boxes</h3>
|
||||||
<p>Select2 also supports multi-value select boxes. The <code>select</code> below is declared with the <code>multiple</code> attribute. Select2 automatially picks up on this:</p>
|
<p>Select2 also supports multi-value select boxes. The <code>select</code> below is declared with the <code>multiple</code> attribute. Select2 automatically picks up on this:</p>
|
||||||
<p>
|
<p>
|
||||||
<select multiple name="e9" id="e9" style="width:300px" class="populate"></select>
|
<select multiple name="e9" id="e9" style="width:300px" class="populate"></select>
|
||||||
</p>
|
</p>
|
||||||
@ -462,7 +462,7 @@ $("#e2_2").select2({
|
|||||||
<h3>Example Code</h3>
|
<h3>Example Code</h3>
|
||||||
<pre class="prettyprint linenums" id="code_e4"></pre>
|
<pre class="prettyprint linenums" id="code_e4"></pre>
|
||||||
<p>
|
<p>
|
||||||
You can set <code>data-</code> attributes to <code><option></code> (or <optgroup>) and use them inside temptlating functions:
|
You can set <code>data-</code> attributes to <code><option></code> (or <optgroup>) and use them inside templating functions:
|
||||||
</p>
|
</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<select>
|
<select>
|
||||||
@ -665,7 +665,7 @@ $("#e11")
|
|||||||
.on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-removing", function(e) { log ("removing val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-removing", function(e) { log ("removing val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-loaded", function(e) { log ("loaded (data property omitted for brevitiy)");})
|
.on("select2-loaded", function(e) { log ("loaded (data property omitted for brevity)");})
|
||||||
.on("select2-focus", function(e) { log ("focus");})
|
.on("select2-focus", function(e) { log ("focus");})
|
||||||
.on("select2-blur", function(e) { log ("blur");});
|
.on("select2-blur", function(e) { log ("blur");});
|
||||||
$("#e11_2")
|
$("#e11_2")
|
||||||
@ -677,7 +677,7 @@ $("#e11_2")
|
|||||||
.on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-removing", function(e) { log ("removing val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-removing", function(e) { log ("removing val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-loaded", function(e) { log ("loaded (data property omitted for brevitiy)");})
|
.on("select2-loaded", function(e) { log ("loaded (data property omitted for brevity)");})
|
||||||
.on("select2-focus", function(e) { log ("focus");})
|
.on("select2-focus", function(e) { log ("focus");})
|
||||||
.on("select2-blur", function(e) { log ("blur");});
|
.on("select2-blur", function(e) { log ("blur");});
|
||||||
});
|
});
|
||||||
@ -1107,7 +1107,7 @@ $(document).ready(function () {
|
|||||||
<dt>element</dt><dd>Uses javascript to calculate the width of the source element.</dd>
|
<dt>element</dt><dd>Uses javascript to calculate the width of the source element.</dd>
|
||||||
<dt>copy</dt><dd>Copies the value of the width style attribute set on the source element.</dd>
|
<dt>copy</dt><dd>Copies the value of the width style attribute set on the source element.</dd>
|
||||||
<dt>resolve</dt><dd>First attempts to <u>copy</u> than falls back on <u>element</u>.</dd>
|
<dt>resolve</dt><dd>First attempts to <u>copy</u> than falls back on <u>element</u>.</dd>
|
||||||
<dt>other values</dt><dd>if the width attribute contains a function it will be avaluated, otherwise the value is used verbatim.</dd>
|
<dt>other values</dt><dd>if the width attribute contains a function it will be evaluated, otherwise the value is used verbatim.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>minimumInputLength</td><td>int</td><td>Number of characters necessary to start a search.</td></tr>
|
<tr><td>minimumInputLength</td><td>int</td><td>Number of characters necessary to start a search.</td></tr>
|
||||||
@ -1416,7 +1416,7 @@ $("#select").select2({
|
|||||||
|
|
||||||
The default tokenizer will only be used if the <code>tokenSeparators</code> and <code>createSearchChoice</code>
|
The default tokenizer will only be used if the <code>tokenSeparators</code> and <code>createSearchChoice</code>
|
||||||
options are specified. The default tokenizer will split the string using any separator in <code>tokenSeparators</code>
|
options are specified. The default tokenizer will split the string using any separator in <code>tokenSeparators</code>
|
||||||
and will create and select choice objects using <code>createSearhChoice</code> option. It will also
|
and will create and select choice objects using <code>createSearchChoice</code> option. It will also
|
||||||
ignore duplicates, silently swallowing those tokens.
|
ignore duplicates, silently swallowing those tokens.
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr id="doc-tokenSeparators"><td>tokenSeparators</td><td>array</td><td>
|
<tr id="doc-tokenSeparators"><td>tokenSeparators</td><td>array</td><td>
|
||||||
@ -1790,7 +1790,7 @@ $("#select").select2({
|
|||||||
<div class="row zebra">
|
<div class="row zebra">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h3>select2-focus</h3>
|
<h3>select2-focus</h3>
|
||||||
<p>Fired when the control is focussed.
|
<p>Fired when the control is focused.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -270,7 +270,7 @@ version: 2.1
|
|||||||
<article class="zebra row" id="multi">
|
<article class="zebra row" id="multi">
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<h3>Multi-Value Select Boxes</h3>
|
<h3>Multi-Value Select Boxes</h3>
|
||||||
<p>Select2 also supports multi-value select boxes. The <code>select</code> below is declared with the <code>multiple</code> attribute. Select2 automatially picks up on this:</p>
|
<p>Select2 also supports multi-value select boxes. The <code>select</code> below is declared with the <code>multiple</code> attribute. Select2 automatically picks up on this:</p>
|
||||||
<p>
|
<p>
|
||||||
<select multiple name="e9" id="e9" style="width:300px"><option value="AL">Alabama</option><option value="AK">Alaska</option><option value="AZ">Arizona</option><option value="AR">Arkansas</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DE">Delaware</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="IA">Iowa</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="ME">Maine</option><option value="MD">Maryland</option><option value="MA">Massachusetts</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MS">Mississippi</option><option value="MO">Missouri</option><option value="MT">Montana</option><option value="NE">Nebraska</option><option value="NV">Nevada</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NY">New York</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VT">Vermont</option><option value="VA">Virginia</option><option value="WA">Washington</option><option value="WV">West Virginia</option><option value="WI">Wisconsin</option><option value="WY">Wyoming</option></select><br/>
|
<select multiple name="e9" id="e9" style="width:300px"><option value="AL">Alabama</option><option value="AK">Alaska</option><option value="AZ">Arizona</option><option value="AR">Arkansas</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DE">Delaware</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="IA">Iowa</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="ME">Maine</option><option value="MD">Maryland</option><option value="MA">Massachusetts</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MS">Mississippi</option><option value="MO">Missouri</option><option value="MT">Montana</option><option value="NE">Nebraska</option><option value="NV">Nevada</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NY">New York</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VT">Vermont</option><option value="VA">Virginia</option><option value="WA">Washington</option><option value="WV">West Virginia</option><option value="WI">Wisconsin</option><option value="WY">Wyoming</option></select><br/>
|
||||||
</p>
|
</p>
|
||||||
@ -762,7 +762,7 @@ version: 2.1
|
|||||||
<tr><td>text</td><td>string</td><td>text of the option being matched</td></tr>
|
<tr><td>text</td><td>string</td><td>text of the option being matched</td></tr>
|
||||||
<tr><td><returns></td><td>boolean</td><td><code>true</code> if search term matches the option text, or <code>false</code> otherwise</td></tr>
|
<tr><td><returns></td><td>boolean</td><td><code>true</code> if search term matches the option text, or <code>false</code> otherwise</td></tr>
|
||||||
</table>
|
</table>
|
||||||
The default implementation is case insensitive and matches anywhere in ther term:
|
The default implementation is case insensitive and matches anywhere in the term:
|
||||||
<code>function(term, text) { return text.toUpperCase().indexOf(term.toUpperCase())>0; }</code>
|
<code>function(term, text) { return text.toUpperCase().indexOf(term.toUpperCase())>0; }</code>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>formatSelection</td><td>function</td><td>
|
<tr><td>formatSelection</td><td>function</td><td>
|
||||||
@ -892,7 +892,7 @@ $("#tags").select2({
|
|||||||
<tr><td>term</td><td>string</td><td>Search term</td></tr>
|
<tr><td>term</td><td>string</td><td>Search term</td></tr>
|
||||||
<tr><td>page</td><td>int</td><td>1-based page number tracked by Select2 for use with infinite scrolling of results</td></tr>
|
<tr><td>page</td><td>int</td><td>1-based page number tracked by Select2 for use with infinite scrolling of results</td></tr>
|
||||||
<tr><td>context</td><td>object</td><td>See <a href="#doc-query-options-callback"><code>options.context</code></a> parameter to the <a href="#doc-query"><code>query</code></a> function above.</td></tr>
|
<tr><td>context</td><td>object</td><td>See <a href="#doc-query-options-callback"><code>options.context</code></a> parameter to the <a href="#doc-query"><code>query</code></a> function above.</td></tr>
|
||||||
<tr><td><returns></td><td>object</td><td>Object containing url paramters</td></tr>
|
<tr><td><returns></td><td>object</td><td>Object containing url parameters</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>results</td><td>function</td><td>
|
<tr><td>results</td><td>function</td><td>
|
||||||
@ -953,7 +953,7 @@ $("#tags").select2({
|
|||||||
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
Example: <pre class="prettyprint">alert("Selected value is: "+$("#e8").select2("val")); $("#e8").select2("val", {id:"CA", text:"Califoria"});</pre>
|
Example: <pre class="prettyprint">alert("Selected value is: "+$("#e8").select2("val")); $("#e8").select2("val", {id:"CA", text:"California"});</pre>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12"><h3>destroy</h3></div>
|
<div class="span12"><h3>destroy</h3></div>
|
||||||
|
@ -415,7 +415,7 @@ $("#e8_set").click(
|
|||||||
<tr><th>Parameter</th><th>Type</th><th>Description</th></tr>
|
<tr><th>Parameter</th><th>Type</th><th>Description</th></tr>
|
||||||
<tr><td>term</td><td>string</td><td>Search term</td></tr>
|
<tr><td>term</td><td>string</td><td>Search term</td></tr>
|
||||||
<tr><td>vars</td><td>object</td><td>The vars object from the previous search's result</td></tr>
|
<tr><td>vars</td><td>object</td><td>The vars object from the previous search's result</td></tr>
|
||||||
<tr><td><returns></td><td>object</td><td>Object containing url paramters</td></tr>
|
<tr><td><returns></td><td>object</td><td>Object containing url parameters</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>results</td><td>function</td><td>
|
<tr><td>results</td><td>function</td><td>
|
||||||
@ -442,7 +442,7 @@ $("#e8_set").click(
|
|||||||
</tr>
|
</tr>
|
||||||
<tr><td>value (optional)</td><td>object</td><td>Result object for the new selection, or the <code>id</code> attribute of a loaded result object</td></tr>
|
<tr><td>value (optional)</td><td>object</td><td>Result object for the new selection, or the <code>id</code> attribute of a loaded result object</td></tr>
|
||||||
</table>
|
</table>
|
||||||
Example: <pre class="prettyprint">alert("Selected value is: "+$("#e8").select2("val")); $("#e8").select2("val", {id:"CA", text:"Califoria"});</pre>
|
Example: <pre class="prettyprint">alert("Selected value is: "+$("#e8").select2("val")); $("#e8").select2("val", {id:"CA", text:"California"});</pre>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12"><h2>Events</h2></div>
|
<div class="span12"><h2>Events</h2></div>
|
||||||
@ -459,7 +459,7 @@ $("#e8_set").click(
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12"><h3>cancelled</h3></div>
|
<div class="span12"><h3>cancelled</h3></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Signalled when the user cancells the selection of a result. For example, when ESC is pressed after the dropdown has been opened</p>
|
<p>Signalled when the user cancels the selection of a result. For example, when ESC is pressed after the dropdown has been opened</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12"><h3>selected</h3></div>
|
<div class="span12"><h3>selected</h3></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -403,7 +403,7 @@ $("#e10_4").select2({
|
|||||||
<article class="row" id="multi">
|
<article class="row" id="multi">
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<h3>Multi-Value Select Boxes</h3>
|
<h3>Multi-Value Select Boxes</h3>
|
||||||
<p>Select2 also supports multi-value select boxes. The <code>select</code> below is declared with the <code>multiple</code> attribute. Select2 automatially picks up on this:</p>
|
<p>Select2 also supports multi-value select boxes. The <code>select</code> below is declared with the <code>multiple</code> attribute. Select2 automatically picks up on this:</p>
|
||||||
<p>
|
<p>
|
||||||
<select multiple name="e9" id="e9" style="width:300px" class="populate"></select>
|
<select multiple name="e9" id="e9" style="width:300px" class="populate"></select>
|
||||||
</p>
|
</p>
|
||||||
@ -475,7 +475,7 @@ $("#e2_2").select2({
|
|||||||
<h3>Example Code</h3>
|
<h3>Example Code</h3>
|
||||||
<pre class="prettyprint linenums" id="code_e4"></pre>
|
<pre class="prettyprint linenums" id="code_e4"></pre>
|
||||||
<p>
|
<p>
|
||||||
You can set <code>data-</code> attributes to <code><option></code> (or <optgroup>) and use them inside temptlating functions:
|
You can set <code>data-</code> attributes to <code><option></code> (or <optgroup>) and use them inside templating functions:
|
||||||
</p>
|
</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<select>
|
<select>
|
||||||
@ -672,7 +672,7 @@ $("#e11")
|
|||||||
.on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-removing", function(e) { log ("removing val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-removing", function(e) { log ("removing val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-loaded", function(e) { log ("loaded (data property omitted for brevitiy)");})
|
.on("select2-loaded", function(e) { log ("loaded (data property omitted for brevity)");})
|
||||||
.on("select2-focus", function(e) { log ("focus");})
|
.on("select2-focus", function(e) { log ("focus");})
|
||||||
.on("select2-blur", function(e) { log ("blur");});
|
.on("select2-blur", function(e) { log ("blur");});
|
||||||
$("#e11_2")
|
$("#e11_2")
|
||||||
@ -684,7 +684,7 @@ $("#e11_2")
|
|||||||
.on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-removing", function(e) { log ("removing val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-removing", function(e) { log ("removing val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
.on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));})
|
||||||
.on("select2-loaded", function(e) { log ("loaded (data property omitted for brevitiy)");})
|
.on("select2-loaded", function(e) { log ("loaded (data property omitted for brevity)");})
|
||||||
.on("select2-focus", function(e) { log ("focus");})
|
.on("select2-focus", function(e) { log ("focus");})
|
||||||
.on("select2-blur", function(e) { log ("blur");});
|
.on("select2-blur", function(e) { log ("blur");});
|
||||||
});
|
});
|
||||||
@ -1142,7 +1142,7 @@ $(document).ready(function () {
|
|||||||
<dt>element</dt><dd>Uses javascript to calculate the width of the source element.</dd>
|
<dt>element</dt><dd>Uses javascript to calculate the width of the source element.</dd>
|
||||||
<dt>copy</dt><dd>Copies the value of the width style attribute set on the source element.</dd>
|
<dt>copy</dt><dd>Copies the value of the width style attribute set on the source element.</dd>
|
||||||
<dt>resolve</dt><dd>First attempts to <u>copy</u> than falls back on <u>element</u>.</dd>
|
<dt>resolve</dt><dd>First attempts to <u>copy</u> than falls back on <u>element</u>.</dd>
|
||||||
<dt>other values</dt><dd>if the width attribute contains a function it will be avaluated, otherwise the value is used verbatim.</dd>
|
<dt>other values</dt><dd>if the width attribute contains a function it will be evaluated, otherwise the value is used verbatim.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>minimumInputLength</td><td>int</td><td>Number of characters necessary to start a search.</td></tr>
|
<tr><td>minimumInputLength</td><td>int</td><td>Number of characters necessary to start a search.</td></tr>
|
||||||
@ -1471,7 +1471,7 @@ $("#select").select2({
|
|||||||
|
|
||||||
The default tokenizer will only be used if the <code>tokenSeparators</code> and <code>createSearchChoice</code>
|
The default tokenizer will only be used if the <code>tokenSeparators</code> and <code>createSearchChoice</code>
|
||||||
options are specified. The default tokenizer will split the string using any separator in <code>tokenSeparators</code>
|
options are specified. The default tokenizer will split the string using any separator in <code>tokenSeparators</code>
|
||||||
and will create and select choice objects using <code>createSearhChoice</code> option. It will also
|
and will create and select choice objects using <code>createSearchChoice</code> option. It will also
|
||||||
ignore duplicates, silently swallowing those tokens.
|
ignore duplicates, silently swallowing those tokens.
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr id="doc-tokenSeparators"><td>tokenSeparators</td><td>array</td><td>
|
<tr id="doc-tokenSeparators"><td>tokenSeparators</td><td>array</td><td>
|
||||||
|
Loading…
Reference in New Issue
Block a user