Unbind jquery plugins

雨燕双飞 提交于 2019-11-29 16:46:25

A "plugin" is just a function added to jQuery.fn. Unless the creator defines a remove or destroy method, the function cannot be reversed.

Edit: the editable function, when given the parameter 'destroy', unbinds the plugin.

Scope your selector to just the newly created form.

$('<form>...</form>').appendTo('someDiv')
                     .find('.edit')
                     .editable();

or

$('form:last').find('.edit')
              .editable();

Note that the selectors for the form are just examples. You just need to find the right form and only apply the editable plugin to the items decorated with the edit class within it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!