【发布时间】:2011-08-16 05:50:48
【问题描述】:
我有一个js动作的负载问题,我有这两行:
$(".sorter td:first-child").css("width", "13px");
$(".sorter td:last-child").css("text-align", "center").css("padding", "0").css("line-height", "0").css("width", "65px");
这个工作正常...但是当我转到 tablesorter 寻呼机插件的第二页时,它不会再次加载。
截图: a busy cat http://www.dreamwire.nl/Cleanished/error.jpg
有人可以帮我解决这个问题吗?这就是我所拥有的所有 JS:
var $sorterTable = $(".sorter");
var tablesorterConfig = { widgets: ['zebra'], headers:{ 0:{sorter:false} } };
tablesorterConfig.headers[$sorterTable.find("thead th").length - 1] = { sorter:false };
$sorterTable
.tablesorter(tablesorterConfig)
.tablesorterPager({container: $("#pager"), positionFixed: false, size : 5 });
$(".sorter td:first-child").css("width", "13px");
$(".sorter td:last-child").css("text-align", "center").css("padding", "0").css("line-height", "0").css("width", "65px");
【问题讨论】:
-
$(".sorter td:last-child").css("text-align", "center").css("padding", "0").css("line-height", "0").css("width", "65px");可以缩短为:$(".sorter td:last-child").css({"text-align": "center","padding": "0", "line-height": "0", "width": "65px"});
标签: jquery plugins pagination tablesorter