diff --git a/index.html b/index.html index c7f75ef2..6d27a73d 100644 --- a/index.html +++ b/index.html @@ -76,7 +76,7 @@ $("#e5").select2({ else if (movie.synopsis !== undefined) { markup += "
" + movie.synopsis + "
"; } - markup += "" + markup += ""; return markup; } @@ -174,7 +174,7 @@ $("#e10").select2({ }); var data=[{id:0,tag:'enhancement'},{id:1,tag:'bug'},{id:2,tag:'duplicate'},{id:3,tag:'invalid'},{id:4,tag:'wontfix'}]; -function format(item) { return item.tag; }; +function format(item) { return item.tag; } $("#e10_2").select2({ data:{ results: data, text: 'tag' }, @@ -250,7 +250,7 @@ $("#e10_4").select2({ var markup=template .replace(/\$url/g, this.html_url) .replace(/\$num/g, this.number) - .replace(/\$title/g, this.title.replace("<", "<")) + .replace(/\$title/g, this.title.replace("<", "<")); list.append(markup); }); @@ -390,7 +390,7 @@ $("#e10_4").select2({

Multi-Value Select Boxes

-

Select2 also supports multi-value select boxes. The select below is declared with the multiple attribute. Select2 automatially picks up on this:

+

Select2 also supports multi-value select boxes. The select below is declared with the multiple attribute. Select2 automatically picks up on this:

@@ -462,7 +462,7 @@ $("#e2_2").select2({

Example Code


             

- You can set data- attributes to <option> (or <optgroup>) and use them inside temptlating functions: + You can set data- attributes to <option> (or <optgroup>) and use them inside templating functions:

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

@@ -665,7 +665,7 @@ $("#e11") .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-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-blur", function(e) { log ("blur");}); $("#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-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-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-blur", function(e) { log ("blur");}); }); @@ -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.

@@ -822,7 +822,7 @@ $("#e14_destroy").click(function() { $("#e14").select2("destroy"); });
-
+