Код: Выделить всё
Admin
Aggiornamento Prezzi
[i]
Tutto
Antintrusione
Antincendio
Prodotti ID
Nome Prodotto
Gamma
Alfanumerico
Descrizione
Assorbimento
Icona 1
Icona 2
Icona 3
Icona 4
Icona 5
Immagine
Garanzia
Riparazione
Costo Acquisto
Prezzo Vendita
Stato
$('table tbody').on('dblclick', 'td', function(){
var valCell = $(this).find('span').text();
$(this).find('span').hide();
$(this).find('div').show().html('\
\
\
\
[/i]\
[i][/i]\
\
');
$(this).find('input').focus();
$(this).closest('tbody').find('td').not($(this)).each(function(){
$(this).find('span').show();
$(this).find('div').hide();
});
});
$('table').on('click','#close',function(){
$(this).closest('td').find('span.value').show();
$(this).closest('div').hide();
});
$('table').on('click','#close',function(){
$(this).closest('td').find('span.value').show();
$(this).closest('div').hide();
});
$('table').on('click','#save', function(){
var getValueInput = $(this).closest('div').find('input').val();
$(this).closest('td').find('span.value').text(getValueInput);
$(this).closest('td').find('span.value').show();
$(this).closest('div').hide();
jQuery.ajax({
url: "conn/action2.php",
method: "POST",
data: {ProdottiID: $('#ProdottiID').val(), NomeProdotto: $('#NomeProdotto').val(), Alfanumerico: $('#Alfanumerico').val()},
cache: false,
success: function(response)
{
alert("Record successfully updated");
}
});
});
Код: Выделить всё
Подробнее здесь: https://stackoverflow.com/questions/786 ... dual-cells
Мобильная версия