且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在jQuery中的动态加载页面上执行自定义功能

更新时间:2023-12-01 23:12:10

您可以在 .load() 回调,如下所示:

You can run the code again in the .load() callback, like this:

$("#"+content_show).load('new-page.php', function() {
  $("#sorttable").tablesorter({
    headers: {0: {sorter: false}}
  });
});

加载内容后,它将再次执行.tablesorter()插件.

This will execute the .tablesorter() plugin again once the content is loaded.