Skip to content

Instantly share code, notes, and snippets.

@danheberden
Last active December 13, 2015 17:58
Show Gist options
  • Save danheberden/4951411 to your computer and use it in GitHub Desktop.
Save danheberden/4951411 to your computer and use it in GitHub Desktop.
success: function(data) {
if(data == 'error') {
} else {
var span = $('<span class="label label-success"><strong>Success</strong></span>');
$this.closest('tr').find('td').first().append( span );
// after 3 seconds...
setTimeout(function(){
// hide the span, once that's done, remove it
span.hide( 'normal', function() {
span.remove();
});
}, 3000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment