diff --git a/demos/autocomplete/custom-data.html b/demos/autocomplete/custom-data.html index 57598fa8c9..139b41d998 100644 --- a/demos/autocomplete/custom-data.html +++ b/demos/autocomplete/custom-data.html @@ -64,7 +64,13 @@ return false; } - }); + }) + .data( "autocomplete" )._renderItem = function( ul, item ) { + return $( "
  • " ) + .data( "item.autocomplete", item ) + .append( "" + item.label + "
    " + item.desc + "
    " ) + .appendTo( ul ); + }; }); diff --git a/demos/autocomplete/folding.html b/demos/autocomplete/folding.html new file mode 100644 index 0000000000..d5bc71e9df --- /dev/null +++ b/demos/autocomplete/folding.html @@ -0,0 +1,64 @@ + + + + + jQuery UI Autocomplete Accent Folding Demo + + + + + + + + + + + +
    + +
    +
    + + +
    +
    + +
    + +
    +

    +The autocomplete field uses a custom source option which will match results that have accented characters even when the text field doesn't contain accented characters. However if the you type in accented characters in the text field it is smart enough not to show results that aren't accented. +

    +

    +Try typing "Jo" to see "John" and "Jörn", then type "Jö" to see only "Jörn". +

    +
    + + + diff --git a/demos/autocomplete/index.html b/demos/autocomplete/index.html index 42f13dc4bc..ba96d994e0 100644 --- a/demos/autocomplete/index.html +++ b/demos/autocomplete/index.html @@ -17,6 +17,8 @@
  • Custom data and display
  • XML data parsed once
  • Categories
  • +
  • Multiple values
  • +
  • Multiple, remote
  • diff --git a/demos/autocomplete/multiple-remote.html b/demos/autocomplete/multiple-remote.html new file mode 100644 index 0000000000..5e0f4b50b7 --- /dev/null +++ b/demos/autocomplete/multiple-remote.html @@ -0,0 +1,75 @@ + + + + + jQuery UI Autocomplete multiple demo + + + + + + + + + + + +
    + +
    + + +
    + +
    + +
    +

    +Usage: Enter at least two characters to get bird name suggestions. Select a value to continue adding more names. +

    +

    +This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field. +

    +
    + + + diff --git a/demos/autocomplete/multiple.html b/demos/autocomplete/multiple.html new file mode 100644 index 0000000000..908cfe6ce7 --- /dev/null +++ b/demos/autocomplete/multiple.html @@ -0,0 +1,69 @@ + + + + + jQuery UI Autocomplete multiple demo + + + + + + + + + + + +
    + +
    + + +
    + +
    + +
    +

    +Usage: Type something, eg. "j" to see suggestions for tagging with programming languages. Select a value, then continue typing to add more. +

    +

    +This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field. +

    +
    + + + diff --git a/demos/autocomplete/remote-with-cache.html b/demos/autocomplete/remote-with-cache.html index 3688365d4e..a00c741e44 100644 --- a/demos/autocomplete/remote-with-cache.html +++ b/demos/autocomplete/remote-with-cache.html @@ -22,12 +22,11 @@ source: function(request, response) { if (cache.term == request.term && cache.content) { response(cache.content); + return; } if (new RegExp(cache.term).test(request.term) && cache.content && cache.content.length < 13) { - var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); - response($.grep(cache.content, function(value) { - return matcher.test(value.value) - })); + response($.ui.autocomplete.filter(cache.content, request.term)); + return; } $.ajax({ url: "search.php", diff --git a/demos/draggable/visual-feedback.html b/demos/draggable/visual-feedback.html index bb54de4fed..4644472f08 100644 --- a/demos/draggable/visual-feedback.html +++ b/demos/draggable/visual-feedback.html @@ -27,7 +27,7 @@ return $('
    I\'m a custom helper
    '); } }); - $("#set div").draggable({ stack: { group: '#set div', min: 1 } }); + $("#set div").draggable({ stack: '#set div' }); }); diff --git a/demos/effect/index.html b/demos/effect/index.html index b914c96c5f..cecceb6cd3 100644 --- a/demos/effect/index.html +++ b/demos/effect/index.html @@ -11,7 +11,7 @@

    Examples