I need to limit the row numbers with 10 while autocomplete. Data is from db. Is there any attribute like 'maxrows' or something?. I don't want to add the scroll.
please suggest method thanks in advance.
my code is:
$("#iIdlbl").autocomplete({
source : function(request, response) {
var value = jQuery("#iIdlbl").val();
$.ajax( {
url : 'getiId.html',
dataType : 'json',
data : {
filter : value
},
success : function(data) {
response(jQuery.map(data.iList,function(item) {
return {
value : item.iId,
key : item.iId
};
}));
},
error : function(XMLHttpRequest,textStatus,errorThrown) {
$.loader('close');
}
});
},
minLength : 0,
open : function() {
$(this).removeClass(
"ui-corner-all").addClass(
"ui-corner-top");
},
close : function() {
$(this).removeClass(
"ui-corner-top").addClass(
"ui-corner-all");
},
select : function(event, ui) {
searchById(ui.item.value);
}
});