我使用的是足脚版本2.0.3。
当我试图手动排序时.
$('.footable').data('footable-sort').doSort(4, true)..。我得到以下错误:
Uncaught TypeError: Cannot read property 'sort' of undefined
at Sort.p.doSort (http://localhost:8080/js/footable.sort.js:125:23)很奇怪。例如,filter正在运行$('.footable').data('footable-filter').filter('some text'),这意味着我的表没有问题。
检查可引脚代码时,ft.columns为空,因此column未定义
var $table = $(ft.table),
$tbody = $table.find('> tbody'),
column = ft.columns[columnIndex],
$th = $table.find('> thead > tr:last-child > th:eq(' + columnIndex + ')'),
cls = ft.options.classes.sort,
evt = ft.options.events.sort;发布于 2015-06-08 16:56:22
当两次调用footable时,就会发生这种情况。复制在这里的弹琴.
$('.footable').footable();
https://stackoverflow.com/questions/30577076
复制相似问题