To expatiate Andrew Whittaker's answer a bit, the source
option of jQuery UI Autocomplete is used to specify an array containing the items that are to be displayed in the drop-down list once the widget is triggered. It can be defined as such an array, a function that returns such an array, or a URL to a resource which produces such an array.
If the array which ultimately becomes the value of source
is empty, the widget won't display a drop-down list. So, defining source
as a function capable of returning a non-empty array only when @
is entered will make the widget behave as you desire.
The widget however, functions as just a part of a component of a tag (herein referred to as mention) management utility, which has 3 components:
Autocomplete module: The component responsible for procuring and displaying the set of items that can be used to create a mention, given a string.
Mention tracking module: The component responsible for keeping track of mention-associated data; at the bare minimum the location, as well as the superficial and substantive (if existent) values of each mention should be tracked throughout all modifications of the text of the input element to which the utility is affixed.
Mention visual differentiation module: The component responsible for differentiating mention text from the rest of the text in the input element to which the utility is affixed
Delving further in to the implementation of the remaining 2 modules, in plain English, would be tedious; its much better to look at code! Fortunately, I've made a solution, Mentionator, that is robust (more so than all the other solutions suggested here), well-structured, easy to follow, and copiously commented. So its worth a look at whether you just want an out-of-the box solution, or reference material to create your own.