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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -