From 11cd18bd93b90ea05a1490f4f66892676a5d9a72 Mon Sep 17 00:00:00 2001 From: Eric Dahl Date: Sun, 26 Jan 2014 13:55:16 -0600 Subject: [PATCH] Documentation: Remove extraneous non-matching close tags: and

--- index.html | 30 ++++++++---------------------- select-2.1.html | 8 ++++---- select2-latest.html | 30 ++++++++---------------------- 3 files changed, 20 insertions(+), 48 deletions(-) diff --git a/index.html b/index.html index 2d4c59df..6d27a73d 100644 --- a/index.html +++ b/index.html @@ -487,7 +487,7 @@ function format(state) {

-

In order to take advantage of custom data loading Select2 should be attached to an input type='hidden' tag, otherwise data is parsed from select's option tags.

+

In order to take advantage of custom data loading Select2 should be attached to an input type='hidden' tag, otherwise data is parsed from select's option tags.

Example Code

@@ -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.

-

Note that the separators are defined in the tokenSeparators option.

+

Note that the separators are defined in the tokenSeparators option.

Note that this example uses the built in tokenizer function, but a custom one can be provided in the options.

@@ -1230,7 +1230,7 @@ $(document).ready(function () { textstringtext of the option being matched. optionjquery object the option element we are trying to match. Only given when attached to select. - Can be used to match against custom attributes on the option tag in addition to matching on the option's text. + Can be used to match against custom attributes on the option tag in addition to matching on the option's text. <returns>booleantrue if search term matches the text, or false otherwise. The default implementation is case insensitive and matches anywhere in the term: @@ -1411,7 +1411,7 @@ $("#select").select2({ <returns>string (optional)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 undefined or null is returned the - input of the search field is unchanged. + input of the search field is unchanged. The default tokenizer will only be used if the tokenSeparators and createSearchChoice @@ -1441,9 +1441,9 @@ $("#select").select2({ Callback function that should be called with the result object. The result object: - + - +
ParameterTypeDescription
result.results[object]Array of result objects. The default renderers expect objects with id and text keys. The id attribute is required, even if custom renderers are used. The object may also contain a childrenkey if hierarchical data is displayed. The object may also contain a disabled boolean property indicating whether this result can be selected.
result.results[object]Array of result objects. The default renderers expect objects with id and text keys. The id attribute is required, even if custom renderers are used. The object may also contain a childrenkey if hierarchical data is displayed. The object may also contain a disabled boolean property indicating whether this result can be selected.
result.morebooleantrueif more results are available for the current search term.
results.contextobjectA user-defined object that should be made available as the context parameter to the query function on subsequent queries to load more result pages for the same search term. See the description of options.context parameter.
results.contextobjectA user-defined object that should be made available as the context parameter to the query function on subsequent queries to load more result pages for the same search term. See the description of options.context parameter.
@@ -1602,7 +1602,7 @@ $("#select").select2({

val

-

Gets or sets the selection. If the value parameter is not specified, the id attribute of the currently selected element is returned. If the value parameter is specified it will become the current selection.

+

Gets or sets the selection. If the value parameter is not specified, the id attribute of the currently selected element is returned. If the value parameter is specified it will become the current selection.

@@ -1626,7 +1626,7 @@ $("#select").select2({
ParameterTypeDescription
- triggerChange (optional)booleanWhether or not a change event should be triggered. false by default. + triggerChange (optional)booleanWhether or not a change event should be triggered. false by default.

val method invoked on a single-select with an unset value will return "", while a val method invoked on an empty multi-select will return [].

@@ -1694,7 +1694,6 @@ $("#select").select2({
added
The added element, if any - the full element object, not just the id.
removed
The removed element, if any - the full element object, not just the id.
-

@@ -1702,27 +1701,23 @@ $("#select").select2({

select2-opening

Fired before the dropdown is shown.

The event listener can prevent the opening by calling preventDefault() on the supplied event object.

-

select2-open

Fired after the dropdown is shown.

-

select2-highlight

Fired when a choice is highlighted in the dropdown.

-

The event object contains the following custom properties:

val
The id of the highlighted choice object.
object
The highlighted choice object.
-

@@ -1730,13 +1725,11 @@ $("#select").select2({

select2-selecting

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 event.preventDefault()

-

The event object contains the following custom properties:

val
The id of the highlighted choice object.
object
The choice object about to be selected.
-

@@ -1744,7 +1737,6 @@ $("#select").select2({

select2-clearing

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 event.preventDefault()

-

For the clear button to be visible the allowClear option needs to be true.

@@ -1753,38 +1745,32 @@ $("#select").select2({

select2-removing

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 event.preventDefault()

-

The event object contains the following custom properties:

val
The id of the removing choice object.
object
The choice object about to be removed.
-

select2-removed

Fired when a choice is removed or cleared.

-

The event object contains the following custom properties:

val
The id of the highlighted choice object.
object
The highlighted choice object.
-

select2-loaded

Fired when query function is done loading the data and the results list has been updated

-

The event object contains the following custom properties:

items
data that was used to populate the results.
-

diff --git a/select-2.1.html b/select-2.1.html index 5523560e..432b9aa2 100755 --- a/select-2.1.html +++ b/select-2.1.html @@ -351,7 +351,7 @@ version: 2.1

-

In order to take advantage of custom data loading Select2 should be attached to an input type='hidden' tag, otherwise data is parsed from select's option tags.

+

In order to take advantage of custom data loading Select2 should be attached to an input type='hidden' tag, otherwise data is parsed from select's option tags.

Example Code

@@ -865,9 +865,9 @@ $("#tags").select2({ Callback function that should be called with the result object. The result object: - + - +
ParameterTypeDescription
result.results[object]Array of result objects. The default renderers expect objects with id and text keys. The id attribute is required, even if custom renderers are used.
result.results[object]Array of result objects. The default renderers expect objects with id and text keys. The id attribute is required, even if custom renderers are used.
result.morebooleantrueif more results are available for the current search term
results.contextobjectA user-defined object that should be made available as the context parameter to the query function on subsequent queries to load more result pages for the same search term. See the description of options.context parameter.
results.contextobjectA user-defined object that should be made available as the context parameter to the query function on subsequent queries to load more result pages for the same search term. See the description of options.context parameter.
@@ -926,7 +926,7 @@ $("#tags").select2({

val

-

Gets or sets the selection. If the value parameter is not specified, the id attribute of the currently selected element is returned. If the value parameter is specified it will become the current selection.

+

Gets or sets the selection. If the value parameter is not specified, the id attribute of the currently selected element is returned. If the value parameter is specified it will become the current selection.

diff --git a/select2-latest.html b/select2-latest.html index 2ef7223b..8ca9608f 100644 --- a/select2-latest.html +++ b/select2-latest.html @@ -500,7 +500,7 @@ function format(state) {

-

In order to take advantage of custom data loading Select2 should be attached to an input type='hidden' tag, otherwise data is parsed from select's option tags.

+

In order to take advantage of custom data loading Select2 should be attached to an input type='hidden' tag, otherwise data is parsed from select's option tags.

Example Code

@@ -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.

-

Note that the separators are defined in the tokenSeparators option.

+

Note that the separators are defined in the tokenSeparators option.

Note that this example uses the built in tokenizer function, but a custom one can be provided in the options.

@@ -1265,7 +1265,7 @@ $(document).ready(function () {
+ Can be used to match against custom attributes on the option tag in addition to matching on the option's text.
ParameterTypeDescription
textstringtext of the option being matched.
optionjquery object the option element we are trying to match. Only given when attached to select. - Can be used to match against custom attributes on the option tag in addition to matching on the option's text.
<returns>booleantrue if search term matches the text, or false otherwise.
The default implementation is case insensitive and matches anywhere in the term: @@ -1466,7 +1466,7 @@ $("#select").select2({ <returns>string (optional)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 undefined or null is returned the - input of the search field is unchanged. + input of the search field is unchanged. The default tokenizer will only be used if the tokenSeparators and createSearchChoice @@ -1496,9 +1496,9 @@ $("#select").select2({ Callback function that should be called with the result object. The result object: - + - +
ParameterTypeDescription
result.results[object]Array of result objects. The default renderers expect objects with id and text keys. The id property is required, even if custom renderers are used. The object may also contain a children key if hierarchical data is displayed. The object may also contain a disabled boolean property indicating whether this result can be selected.
result.results[object]Array of result objects. The default renderers expect objects with id and text keys. The id property is required, even if custom renderers are used. The object may also contain a children key if hierarchical data is displayed. The object may also contain a disabled boolean property indicating whether this result can be selected.
result.morebooleantrueif more results are available for the current search term.
results.contextobjectA user-defined object that should be made available as the context parameter to the query function on subsequent queries to load more result pages for the same search term. See the description of options.context parameter.
results.contextobjectA user-defined object that should be made available as the context parameter to the query function on subsequent queries to load more result pages for the same search term. See the description of options.context parameter.
@@ -1689,7 +1689,7 @@ $("#e1").select2({

val

-

Gets or sets the selection. If the value parameter is not specified, the id attribute of the currently selected element is returned. If the value parameter is specified it will become the current selection.

+

Gets or sets the selection. If the value parameter is not specified, the id attribute of the currently selected element is returned. If the value parameter is specified it will become the current selection.

@@ -1713,7 +1713,7 @@ $("#e1").select2({
ParameterTypeDescription
- triggerChange (optional)booleanWhether or not a change event should be triggered. false by default. + triggerChange (optional)booleanWhether or not a change event should be triggered. false by default.

val method invoked on a single-select with an unset value will return "", while a val method invoked on an empty multi-select will return [].

@@ -1781,7 +1781,6 @@ $("#e1").select2({
added
The added element, if any - the full element object, not just the id.
removed
The removed element, if any - the full element object, not just the id.
-

@@ -1789,27 +1788,23 @@ $("#e1").select2({

select2-opening

Fired before the dropdown is shown.

The event listener can prevent the opening by calling preventDefault() on the supplied event object.

-

select2-open

Fired after the dropdown is shown.

-

select2-highlight

Fired when a choice is highlighted in the dropdown.

-

The event object contains the following custom properties:

val
The id of the highlighted choice object.
object
The highlighted choice object.
-

@@ -1817,13 +1812,11 @@ $("#e1").select2({

select2-selecting

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 event.preventDefault()

-

The event object contains the following custom properties:

val
The id of the highlighted choice object.
object
The choice object about to be selected.
-

@@ -1831,7 +1824,6 @@ $("#e1").select2({

select2-clearing

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 event.preventDefault()

-

For the clear button to be visible the allowClear option needs to be true.

@@ -1840,38 +1832,32 @@ $("#e1").select2({

select2-removing

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 event.preventDefault()

-

The event object contains the following custom properties:

val
The id of the removing choice object.
object
The choice object about to be removed.
-

select2-removed

Fired when a choice is removed or cleared.

-

The event object contains the following custom properties:

val
The id of the highlighted choice object.
object
The highlighted choice object.
-

select2-loaded

Fired when query function is done loading the data and the results list has been updated

-

The event object contains the following custom properties:

items
data that was used to populate the results.
-