我如何杀死插件? [英] How Do I Kill A Plugin?

查看:103
本文介绍了我如何杀死插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了一个datepicker插件jquery。我希望当某个元素上的hppen焦点事件时,日期选择器插件已删除。

I used a datepicker plugin jquery.I want when hppen focus event on some element the date picker plugin had remove.

推荐答案

kill的概念不适用于那些插件。这不是安装的服务占用一些内存,或类似的东西。 Javascript基于自动内存管理。如果某个对象最终变得无法访问,主机最终将回收内存。



如果您指的是其他内容,例如从页面中删除某些元素,请询问它。但一般来说,它只不过是从HTML DOM中删除一些元素。使用jQuery,这里都有描述:

http://api.jquery.com/category/manipulation [ ^ ],

http://api.jquery.com/category/manipulation/dom-removal/ [< a href =http://api.jquery.com/category/manipulation/dom-removal/target =_ blanktitle =New Window> ^ ]。



-SA
The concept of "killing" in inapplicable to those plug-ins. This is not an installed service taking up some amount of memory, or something like that. Javascript is based on automatic memory management. If some object eventually becomes inaccessible, the host will eventually reclaim the memory.

If you mean something else, such as removing some element from the page, ask about it. But generally, it's nothing more than removing some element from HTML DOM. With jQuery, this is all described here:
http://api.jquery.com/category/manipulation[^],
http://api.jquery.com/category/manipulation/dom-removal/[^].

—SA


这篇关于我如何杀死插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆