[英]invoke cancel on jeditable
is there a way to invoke "cancel" on a jeditable area from an external call? 有没有办法在外部呼叫的可调整区域上调用“取消”? (instead of clicking cancel) - basically to close the textarea.
(而不是单击取消) - 基本上关闭textarea。
It looks like jeditable exposes a method for "cancel" directly on the DOM element that was used to initialize the editable section. 看起来像jeditable直接在用于初始化可编辑部分的DOM元素上公开“取消”的方法。
For example: 例如:
// A paragraph with jeditable initialized like this:
$('p#editable').editable();
// Could be canceled with:
$('p#editable')[0].reset();
Another option would be to trigger the "click" event on the cancel button itself. 另一种选择是在取消按钮本身上触发“点击”事件。 In order to do this, we can specify specific html for the cancel button.
为此,我们可以为取消按钮指定特定的html。
$('p#editable').editable({
cancel: '<button class="cancel_button">cancel</button>'
});
// And to cancel:
$('p#editable').find('.cancel_button').click();
You can also simply do that: 你也可以这样做:
('.your_jedit_class').each(function(){
this.reset()
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.