Skip to content

Instantly share code, notes, and snippets.

@AnkurVyas-BTC
Created August 15, 2016 07:14
Show Gist options
  • Save AnkurVyas-BTC/8905c2143d86377fbaf4a45756479d0d to your computer and use it in GitHub Desktop.
Save AnkurVyas-BTC/8905c2143d86377fbaf4a45756479d0d to your computer and use it in GitHub Desktop.
Before and after callbacks for the tag it
$(“#tags”).tagit({
availableTags: [‘ruby’, ‘rails’,’range’, ‘ready’],
tagLimit: 2,
beforeTagAdded: function(event, ui){
// Do something special as you want
}
afterTagAdded: function(event, ui){
// Do something special as you want
}
beforeTagRemoved: function(event, ui){
// Do something special as you want
}
afterTagRemoved: function(event, ui){
// Do something special as you want
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment