Friday, March 27, 2015

Clearing textbox after selecting item form JQuery autocomplete

If you need to clear textbox after selecting an item from JQuery AutoComplete list, all you have to do is clear the text box and return false from the select event.


$("#product").autocomplete({
source: "url",
minLength: 2,
select: function( event, ui ) {
$(this).val("");
return false;
});

No comments:

Post a Comment