1

I am using jquery autocomplete (1.8) to fill tags just like explained in http://net.tutsplus.com/tutorials/javascript-ajax/how-to-use-the-jquery-ui-autocomplete-widget/.

What i need is after selection of LI item from drop down menu, that item should be removed from list.

In select section of autocomplete I tried to get current LI using diff method like

$(this).get(0).tagname //which return undefined 
e.target.id //which return id of textfield to which autocomplete is bound
kiranking
  • 306
  • 11
  • 29
  • Are you using an array as the data source of your autocomplete? – bfavaretto Jul 07 '11 at 19:48
  • @bfavaretto its JSON object just as in tutorial. The dropdown menu is nothing but li items, why couldn't it possible to get the id of that li because select means actually a click on that li item. Anyway I will go through ur method see how it works. thanx – kiranking Jul 07 '11 at 20:59
  • In the tutorial, the JSON data comes from a server-side script. The list is populated on the fly as you type (i.e., `
  • `s are created on the fly). If you remove the '
  • ', it will probably be reinserted later by the autocomplete plugin.
  • – bfavaretto Jul 07 '11 at 21:25