jQuery Autocomplete: how to refresh list?
Posted
by cinematic
on Stack Overflow
See other posts from Stack Overflow
or by cinematic
Published on 2009-10-17T00:42:17Z
Indexed on
2010/06/11
11:22 UTC
Read the original article
Hit count: 493
I have a form with a variable number of autocomplete fields that use the same select list. These fields are added and removed as needed. Whenever a parameter on the page is changed, I (try to) update the list for all the fields by first calling unbind() then autocomplete() with a new parameter added to the url.
$('input.foo').unbind().autocomplete(url?new_param=bar);
The problem is that unbind() does not seem to be unbinding. When I type in the input field, it fires off the entire history of autocomplete events.
I also tried flushCache to no avail.
How do I clear out the old events?
Thanks.
© Stack Overflow or respective owner