Hi,

I want to bind events when certain elements are added to the HTML DOM.
The elements are assembled as strings and then set with jquery methods
like .html(htmlString), .append(htmlString). It looks like this is the
job of the jquery load event.

I want to unbind events when the elements are removed from the HTML DOM.
It looks like this is the job of the jquery unload event.

What is the best way to do this?

Do the load and unload events work for HTML added on the fly by methods
like .html(htmlString), .append(htmlString)? I can't seem to make it
work, at least for the load event.

I have tried applying the load event before and after the html has been
set. Neither worked.

I see from the archives that the livequery plugin is used for this type
of thing, but it does not have an 'unload' equivalent. Or does it have
something similar that I am not able to deduce?

thanks,
-Rob

Reply via email to