Sabtu, Maret 19, 2011

JQuery : Autocomplete not working more than 10 rows

Case : You are using JQuery autocomplete, but the data cannot display more than 10 rows
Solution : using option "Max"
Script :

$().ready(function() {
$("#targetDiv1").autocomplete("actions/autocomplete.php?p=provinsi", {
max: 100,
width: 260,
selectFirst: false,
});

$("#targetDiv2").autocomplete("actions/autocomplete.php?p=kabkota", {
max: 100,
width: 260,
selectFirst: false,
});

$("#targetDiv3").autocomplete("actions/autocomplete.php?p=kecamatan", {
max: 100,
width: 260,
selectFirst: false,
});
});

0 comments: