请先查看下面的
$('#ResetButton').click(function() {
alert($('#test').html()); // ALERT WORKING FINE
$('#test').editable('setValue',null); // THIS DOESN'T RUN
});
我很困惑为什么警报工作但下一行没有。我试过小提琴测试,它工作正常,但它不在我的应用程序。我的应用包含bootstap和x-editable。你能举出任何猜测吗?
这是另一个,线已经互换了..
$('#ResetButton').click(function() {
$('#test').editable('setValue',null); // THIS DOESN'T RUN
alert($('#test').html()); // AND SO AS THIS LINE, DOESN'T WORK
});
最后......
$('#test').editable('setValue','Hello World'); // THIS WORKS
$('#ResetButton').click(function() {
$('#test').editable('setValue',null); // THIS DOESN'T RUN
alert($('#test').html()); // AND SO AS THIS LINE, DOESN'T WORK
});