Javascript JavasScript-jtable无法通过在click事件中调用来显示
我是JavaScript的新手。我在使用jtable时遇到问题。请帮忙 下面是我的例子:我使用jtable创建一个表Javascript JavasScript-jtable无法通过在click事件中调用来显示,javascript,jquery-jtable,Javascript,Jquery Jtable,我是JavaScript的新手。我在使用jtable时遇到问题。请帮忙 下面是我的例子:我使用jtable创建一个表 $(document).ready(function (){ $("#roomlist").click(function(){ $("#content").empty().append( '<div class="filtering">find: <input type="text" name="name" id="name" />
$(document).ready(function (){
$("#roomlist").click(function(){
$("#content").empty().append(
'<div class="filtering">find: <input type="text" name="name" id="name" /><button type="submit" id="LoadRecordsButton">search</button></div>'
).jtable({
title: 'roomlist',
paging: true,
pageSize: 2,
sorting: true,
defaultSorting: 'name ASC',
actions:{
listAction: base_url+'index.php/role/leader/listroom'
},
ajaxSettings: {
type: 'POST',
dataType: 'json'
},fields:{
uuid:{
key:true,
list:false
},
city:{
list:false
},
....
嗯$(“#roomlist”)。单击可引用jquery对象的函数。。但不调用它。。请尝试$(“#roomlist”)。单击();已尝试$(“#roomlist”)。单击();但问题还是发生了。。。可能是JSFIDLE或显示代码的更多部分。。如果处理程序的第一次调用起作用,则处理程序函数可能正常。但是您没有显示可能错误的代码的其他部分。加。。您只展示了处理函数的一半…现在我可以通过在加载表之前添加一个.jtable('destroy')来解决这个问题。谢谢!
$('#another_link').click(function(){
$('#roomlist').click();
});