Yes.
Two options.
1. to remove function from the DOM:
window.functionname=null;

2. To create "one-time" functions, like:
(function (){
function a() {alert('a')}
function b() {alert('b')}
function c() {a();b();}
})();

the function a,b,c are relase after they run.

OR
(function (){
a=function() {alert('a')}
b=function() {alert('b')}
c=function() {a();b();}
})();


On Jan 13, 9:53 pm, nihal <nihal.c...@gmail.com> wrote:
> hi
>
> i have a div whose content is loaded via ajax..that content contains
> html+javascript
> the javascript contains a function called test()
> when the content is loaded this function is added to the dom...now
> when i remove the div using remove(); i am still able to run the
> function test() as its still in the dom
>
> is there anyway to remove the newly added function from the dom?
>
> thanks for your help

Reply via email to