Saturday, 15 February 2014

jquery autocomplete select event -



jquery autocomplete select event -

i using autocomplete display items contain html markup such t128 first script display autocomplete list, not html..it display t128 in list, can select item:

var createautocomplete = function () { var $input = $(this); var options = { source: $input.attr("data-jax-autocomplete"), minlength: 3 }; $input.autocomplete(options) };

i found prepare render html markup in autocomplete list, after changing script, found can no longer select item on list:

var createautocomplete = function () { var $input = $(this); var options = { source: $input.attr("data-jax-autocomplete"), minlength: 3 }; $input.autocomplete(options).data("autocomplete")._renderitem = function (ul, item) { homecoming $("<li></li") .append("<a>" + item.label + "</a>") .appendto(ul); }; };

i able solve using jquery.ui.autocomplete.html.js extension scott

jquery

No comments:

Post a Comment