P Coder P Coder - 1 year ago 82
jQuery Question

How to remove an autocomplete once added to an element?

After I add a autocomplete to an element like:

{'onItemSelect': handleItemSelect}, {'extraParams': 'ndo' + ndo});

Is there a way I could disable it or remove the autocomplete for the element dynamically?

I am using modified jquery autocomplete plugin from Dylan Verheul.

Answer Source

You can remove the autocomplete behaviour by using following line of code:

if (jQuery(control).data('autocomplete')) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download