Hello everyone
I have an issue which i thought i'd solved. But it turn out the way i'm doing it is creating a huge memory leak.
I have a page which on document.ready i attach my events and my superfish menus....
every minute the page does some ajax calls and replaces the contents of some divs with new shiny content....
within these divs are elements i want some events on, including some menus...
so i put the code to add the events and menus i wanted in a function and called this in the document.ready and the ajax successful call back, hey presto the shiny content has the events and menu attached.
unfortunately my ram soon runs out.
i think the menus especially are still resident in memory attached to the dom elements which since have been replaced.
So really i'm asking if this is possible?
is there a better way to attach the events rather than call in the successful callback everytime?
and how do i clear the objects associated with the dom elements I am replacing?
Many thanks for any help you can give.
Tom