jQuery Autocomplete problem

jQuery Autocomplete problem

Hi,

can you help me with the jQuery Autocomplete..

here is my problem...

I have an autocomplete field on a form.. i want to search for certain fullname

for example i typed in John Doe or Doe John it will suggest me the name having john and doe on their names.

currently when i search John it works fine but when i use space after John it closes the suggestions the same thing when i typed in Doe{space}John.

so basically i want to search for fullname having the terms with spaces in any order.

here is my jquery:

 $("#fullname").autocomplete({
        source: "autocomplete.php",
        multiple: true,
        multipleSeparator: " ",
        matchContains: "word",
        minLength:0,
        select: function(event, ui) {
            var url = ui.item.id;
            if(url != '#') {
                location.href = '/site/' + url;
            }
        },
 
        html: true, // optional (jquery.ui.autocomplete.html.js required)
 
      // optional (if other layers overlap autocomplete list)
        open: function(event, ui) {
            $(".ui-autocomplete").css("z-index", 1000);
        }
    });

thank you