我正在使用TableSorter插件构建一个应用程序,并且是Pager插件。在Firefox和IE中,情况非常好,但是在Safari(PC上的4.0.4)和Chrome()键入以下代码时,我会遇到错误。我拿出了Pager的约束力,它起作用了,因此这三行代码中的某个地方出现了问题。

var tableSel = calendarportlet.ut.createIdSelector(calendarportlet.addNamespace("eventListTable"));
var pagerSel = calendarportlet.ut.createIdSelector(calendarportlet.addNamespace("pager"));
jQuery(tableSel).tablesorter({
widthFixed: true,
headers: { 0: {sorter: false} },
sortList:[[2,1],[1,0]],
widgets: ['zebra']
}).tablesorterPager({ <-- error happens in here
container: jQuery(pagerSel),
positionFixed: false
});

同样,仅在jQuery后加载原型JS时,才会在Safari和Chrome中发生错误。如果它们在jQuery之前加载,则可以正常工作。但是,这是一个港口,它必须与其他Portlet一起玩,因此我们不想修改JS LIBS的标头和加载顺序。有人对如何解决这个问题有任何想法吗?

有帮助吗?

解决方案

我升级了原型,现在一切正常。我现在在Firebug中遇到了“ $不是函数”错误,但是一切似乎都可以。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top