Setting options in autocomplete after init has no effect

Setting options in autocomplete after init has no effect

Hello, I set up autocomplete (jQuery UI autocomplete - added in 1.8) like this:

  1. $("#client").autocomplete({
  2. minLength: 0,
  3. source: '/path/to/autocomplete/ajax/datasource'
  4. });

Autocomplete works as expected. But then I need to change "source" option so I do this:

  1. $("#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).


  1. $("#client").autocomplete("destroy");

Has anyone experienced this? Or am I doing anything wrong? Thanks.