Setting options in autocomplete after init has no effect
Hello, I set up autocomplete (jQuery UI autocomplete - added in 1.8) like this:
- $("#client").autocomplete({
- minLength: 0,
- source: '/path/to/autocomplete/ajax/datasource'
- });
Autocomplete works as expected. But then I need to change "source" option so I do this:
- $("#client").autocomplete("option", "source", "/path/to/another/datasource");
but is still requests original datasource URL (I used to FireBug and it's the same URL). No change happened. I tried different options, but with no luck. Even destroy does not work (i.e. autocomplete keeps working after destroy).
- $("#client").autocomplete("destroy");
Has anyone experienced this? Or am I doing anything wrong? Thanks.