jquery - Autocomplete not allowing spaces -


i using autocomplete in site this:

$(document).ready(function(){            $('input[type="text"]').each(function(){     var $this = $(this);         $this.autocomplete({                           minlength: 1,                                                        source: "{site_url}publish/my_autocomplete?key=" + $this.attr('id')         })     });      }) 

it working fine when there word 'harley motor' , if have typed 'ey ' space not displaying. suggestions how can select harley motor typing ey trailing space?

the url needs escaped, since not have issue:

blank spaces in ajax request jquery

you need escape:

source: escape("{site_url}publish/my_autocomplete?key=" + $this.attr('id')) 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -