您好我正在使用jquery table sorter与pager.I有四个表和寻呼机每个。显示表和相应的寻呼机,同时单击按钮。同时单击第一个和第二个按钮,寻呼机的表工作正常。jquery tablesorter寻呼机不工作
但是,当点击第三个和第四个按钮时,我得到 以下错误“Uncaught TypeError:无法设置未定义的属性”窗口小部件“,传呼机无法正常工作。
Code called in OnLoad:
$("#tableTest").hide(); // Hide the table in onload
$("#tableTest").tablesorter(); // Trigger the tablesorter in onload
$("#tableTest").trigger("update"); // Trigger the update function for table in onload
$("#tableTest").tablesorterPager({ container: $("#pagerTest") }); // Trigger the pager for table in onload
Code After displaying the table
$("#tableTest").trigger("update");
$("#tableTest").data("tablesorter").widgets = ["zebra"];
$("#tableTest").trigger('applyWidgets');
$('header,body,html').animate({ scrollTop: $('header').height() }, 4);
请指导我什么是问题,我在哪里wrong.Pager不正常工作的第三和第四表。
你可以显示所有四个tablesm的代码,以及如何更新它们...对我来说,它听起来像一个表(而不是tbody的内容)正在被完全替换,并且tablesorter没有被重新初始化 - 'trigger(“update”)'只适用于tbody更新。 – Mottie