.autocomplete_tags as the class to indicate we want tag autocompletion
This commit is contained in:
parent
c75e7060e6
commit
8ea25a4e90
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
$(function(){
|
||||
var metatags = ['order:id', 'order:width', 'order:height', 'order:filesize', 'order:filename'];
|
||||
|
||||
$('[name=search]').tagit({
|
||||
$('.autocomplete_tags').tagit({
|
||||
singleFieldDelimiter: ' ',
|
||||
beforeTagAdded: function(event, ui) {
|
||||
if(metatags.indexOf(ui.tagLabel) !== -1) {
|
||||
|
@ -66,7 +66,7 @@ $(function(){
|
|||
if(keyCode == 32) {
|
||||
e.preventDefault();
|
||||
|
||||
$('[name=search]').tagit('createTag', $(this).val());
|
||||
$('.autocomplete_tags').tagit('createTag', $(this).val());
|
||||
$(this).autocomplete('close');
|
||||
} else if (keyCode == 9) {
|
||||
e.preventDefault();
|
||||
|
|
Reference in a new issue