使用appendTo

时间:2015-12-23 07:16:13

标签: javascript jquery asp.net

我有一个AutoPostBack设置为true的复选框:

<div id="section">
    <dx:ASPxCheckBox runat="server" ID="chbxEnabled" Text="Enable something" AutoPostBack="True" ClientInstanceName="chbxEnabled"  />
</div>

该复选框位于HTML代码中,由jQuery appendTo命令移动:

$('#section').appendTo('#anotherSection');

appendTo命令之后会发生两次调用复选框回发的情况。 我可以在Chrome调试器中看到复选框上有2个click个事件侦听器。

如果不移动该部分,则只会注册一个事件。

我该如何解决?

0 个答案:

没有答案