loading/unloading jquery bindings etc dynamically
hi ,
i love jquery but i'm getting confused :)
i had a concept of a tree on the left driving the content and behaviour of a corresponding editing region (a div) to the right of it - click an element in the tree and you see an appropriate editor/behaviour in the div.
it's easy to set up wrt the html in the div - and there is a function that seems to be designed to load javascript on demand - but - when a new item in the tree is clicked - how does one know what to unload/ wrt use of jquery/javascript memory so that it's back where it was.
bad explanation?
i.e. i want to push/pop jquery bindings (etc) i guess. but i'm not sure what bits need undoing - a click() binding probably does but what else - or maybe the binding disappears when the associated elements(s) disappear - i dunno - confused. maybe there is a way to 'mark' jquery use and undo everything to that 'mark'.
am i making any sense?
the new progressive enhancement book talks about dynamically loading html into a div, but does (afaics) not touch on managing the associated javascript and jquery click bindings etc.
i'm worried about using more and more memory.
sorry - bit of a ramble.
this would be a adobe air context and currently i've taking the approach of loading everything and hiding/unhiding as necessary - but it will be a fairly big app - does it matter? - it seems so wasteful but perhaps that's the dinosaur in me coming out... :)