layui table表格字段过长,鼠标放到上面展示完整信息


table.render({
  cols:  [[ 
    {checkbox: true} //多选框
    ,{field: 'id', title: 'ID'}
    ,{field: 'name', title: '名字'}
  ]]
  ,done:function(res, curr, count){
        tabTitle();//调用方法
    }
});

tabTitle方法:

function tabTitle(){
    $('th').each(function(index,element){
        $(element).attr('title',$(element).text());
    });
    $('td').each(function(index,element){
        $(element).attr('title',$(element).text());
    });
};

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM