How can I save an item via jquery to be used later?
I have the following structure, where I retrieve the item from an onclick event of a button, retrieve the row of the table to which that button is associated, and display the information for that row with a modal
RemoveTableRow = function(item) {
var Linha = $(item).closest('tr');
var Codigo = $(Linha).find('td[data-codigo]').data('codigo');
AbreModal('Deseja realmente excluir esse Contato?');
return false;
}
Then when the user clicks on the delete button belonging to modal, to remove the row from the table would like to recover this item
to be able to perform the fact function to delete:
var tr = $(item).closest('tr');
tr.fadeOut(400, function() {
tr.remove();
});