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 SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

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