Sandy, some of your reply got left out of the post?

Penter,
Usually what I do is that I have a separate attach method in the class
that attaches whatever events that need to be attached that I can call
at any time.
For example; if I already have a list with, let's say, tasks that I
have in a page build with php (without using ajax or something) I run
the same class to "add" the js magic. This class walks through my
elements or page and does what it should do (e.g. attaching click
events). Then when updating the div with tasks with more task fetched
by ajax I insert the fetched content, grab those new links (or
whatever) and run the attach method again.
Elements that have been processed already could have a (css) class so
I can leave those out of the search-n-grab, or I have an array or
object on my class that I can compare results with, or I store a
property on the links.. whatever suits me to be able to find-n-grab
those "fresh" inserted elements that I need for my attach method.




On Aug 14, 12:54 am, Sanford Whiteman <[email protected]>
wrote:
> > i think i understand the problem, but how can i wrok with the divs?
> > what's the most elegant way to get this workin?
>
> Namespacing the response is one way:

Reply via email to