jQuery UI Autocomplete, How to enable autocomplete only if user type in a special charactor? -


I have completely connected to different types of input boxes whenever the user types something correctly , Then loads the objects. However, in one of the texterrari , I want to completely disable it by default, and enable the user when typing it in "@". How to do this

This will do the trick:

  $ ('Textarea'). Autocomplete ({source: availableTags}) Autocomplete ('disable') .on ('keypress', function (event) {// Determine whether '@' was closed if (event.shiftKey & amp;; Amp; event.keyCode == = 64) {$ (this). Autocomplete ('Enable'); Return False;}});   

Live example -

Comments

Popular posts from this blog

python - Assemble mpeg file unable to play in mediaplayer -

c# - crystal report failed -

mongodb - CakePHP paginator ignoring order, but only for certain values -