鼠标移到行上显示,移出消失效果

       $("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();
               }
           }
       });
    });
原文地址:https://www.cnblogs.com/krisy/p/4384675.html