hello guys is there anyone know how to destory a javascript ( jquery ) function? im using jquery "selectable" and a function call "edit" is fired on selectable "stop" event. inside this "edit" function i has nested switch functions with a lot of "click" event. and i have many functions within each "click" event. my problem is, everytime i fire the "selectable" functions and events inside the function "edit" is fired again but the previous functions and events still exist. what i do now is to unbind every event in the function "edit" on selectable "start" even.
is this a memory leaks problem? and is there a way to "destory" functions in javascript? i have tried to declaim the function to null when the function is end but this does not work. functions and events inside it still exist.
anyone have a clue?
thanks in advance
ben :)
demo page here --> http://dreamerscorp.com/test/test01/javascript%5Fdestory%5Ftest.html
edit 2009/10/31 :) thanks a lot for your helps, your comments are very useful to me, thanks again!!!