diff --git a/examples/2002.html b/examples/2002.html index 33ce3d1..627a6b6 100644 --- a/examples/2002.html +++ b/examples/2002.html @@ -1,3 +1,3 @@

Lists using AJAX work the same way as lists with local options.

-

In this example, our initial list has local options and all of it's children lists are powered by AJAX.

+

In this example, our initial list has local options and all of its children lists are powered by AJAX.

\ No newline at end of file diff --git a/js/autocomplete.js b/js/autocomplete.js index e4f6218..109c44f 100644 --- a/js/autocomplete.js +++ b/js/autocomplete.js @@ -892,15 +892,14 @@ var buildOption = function(option, parentList) { var childrenListName = getChildrenListName(option, parentList); var html = '
  • ' + - option.optionHTML; + 'data-option-id="' + encode(optionId) + '">'; // TODO: make this configurable if (typeof childrenListName === 'string') { html += ''; } - html += '
  • '; + html += option.optionHTML + ''; return html; };