<分区>
具有将 php 页面加载到 div 中的以下代码,一旦添加此内容,该 php 页面上的 jquery 似乎不起作用。它只有在你直接打开它时才有效(没有 ajax)
有什么想法吗?
AJAX 代码
<script>
$(document).ready (function() {
$('#NavButton1').click(function(event) {
$('#content').empty();
$('#content').load('placeholder.php');
})
})
</script>
PHP页面上的jquery代码
<script>
$(document).ready(function() {
// call the tablesorter plugin
$('#myTable').tablesorter({
// sort on the first column and third column, order asc
sortList: [[0,0],[2,0]]
});
});
</script>