1
How can I save an item via jquery to be used later?
I have the following structure, where it retrieves the item of an onclick event from a button, retrieve the row of the table to which this button is associated and display the information relating to that line 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 table row would like to recover that item
to be able to perform the actual function to delete:
var tr = $(item).closest('tr');
tr.fadeOut(400, function() {
tr.remove();
});
Instead of removing, you can just hide... and if you need the data again, it will still be on the page, although hidden.
– Sam
but I can’t catch it because I’m sending the item in the onclick event of the delete button that has in each row of the table ... and I need to pick it up on the confirmation button which is a modal button event
– Bruno Aparecido da Silva