$("tr.tr_data").hover(function(){ $(this).find(‘.fa-close‘).show(); }, function(){ $(this).find(‘.fa-close‘).hide(); } );
$(‘i.delete-report-item‘).click(function(){ var itemId=$(this).attr(‘itemId‘); if(!confirm(‘Are you sure to delete this item?‘)){ return false; } $.ajax({ type: "GET", cache: false, url: "test.php", data: {‘itemId‘: itemId}, dataType: "json", success: function(data){ if(data.result){ $("table.datadd").find("i[itemId="+itemId+"]").parent().parent().remove(); } } }); });
时间: 2024-11-08 00:40:29