How would I specify the width of the results for the following jQuery Auto-Complete?
$( "#autocomplete" ).autocomplete({
minLength: 2,
source: function( request, response ) {
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" );
response( $.grep( tags, function( item ){
return matcher.test( item );
})
}
});
Thanks!
$( "#autocomplete" ).autocomplete({
open: function() {
// After menu has been opened, set width to 100px
$('.ui-menu')
.width(100);
} ,
minLength: 2,
source: function( request, response ) {
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" );
response( $.grep( tags, function( item ){
return matcher.test( item );
}) );
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With