jQuery Autocomplete plugin 1.2.3 limit for query [closed]

0

I use Jörn Zaefferer's jQuery Autocomplete plugin 1.2.3.

I would like to know how to do the query only if I enter more than 3 characters.

Call the plugin like this:

$("#suggest5").autocomplete('completar.php', {
                width: 600,
                multiple: false,
                matchContains: true
            });
    
asked by anonymous 01.03.2016 / 20:39

1 answer

1

You can do this:

 if($("#suggest5").lenght>3){   
        $("#suggest5").autocomplete('completar.php', {
                        width: 600,
                        multiple: false,
                        matchContains: true
        });
    }
    
03.03.2016 / 03:45