0

创建具有 2 个操作的函数时,一个是返回确认,另一个是来自 tablesorter 的 applywidgets。

我是否需要在函数中引用/加载 tablesorter.trigger('applyWidgets');

4

1 回答 1

0

在我添加到您的另一个问题的评论中,我分享了当您使用时return confirm(),下面的任何代码都return将被忽略。在它前面confirm没有使用。return

触发的“applyWidgets”不需要任何对 tablesorter 的引用。如果尚未应用 tablesorter,则表不会发生任何事情,也不会发生错误。

function yeah() {
    confirm('Are you sue you want to delete?');
    $("#receipts").trigger('applyWidgets');
    return false;
}
于 2016-11-06T19:41:14.593 回答