用了$.noConflict(true)后,bootstraptable 导出失效
为了防止页面引入的jquery版本冲突,var $jQuery_edit = $.noConflict(true);然后用$jQuery_edit代替原来的$,其它所有功能都正常,但是table导出失效了!
<button type="button" class="" id="btnExport">导出</button>
下面是导出功能的js:
//导出
function tableExport(){
$jQuery_edit('#tb_user_edit').tableExport(
{
type: 'excel',//导出excel
escape: 'false' ,
ignoreColumn: [0], //忽略某一列的索引
fileName: '母猪档案', //文件名称设置
worksheetName: 'sheet1', //表格工作区名称
tableName: '母猪档案',
excelstyles: ['background-color', 'color', 'font-size', 'font-weight']
}
)
}
$jQuery_edit$('#btnExport').bind('click', function () {
tableExport();
})
不知道是什么原因了,请教各位大侠!