P
P
P0WERMIC2011-04-01 19:20:07
JavaScript
P0WERMIC, 2011-04-01 19:20:07

How to update DOM from jQuery?

There is such a problem - a lot of different jQuery code. Something is updated by AJAX and to update the entire DOM tree so that returned elements are also included in the tree.
You can of course live() or the jQuery Lister Plug-in, but the code is so big and confusing that this option would result in a lot of rewriting, so it's not an option.
Please suggest the ideal solution to update the DOM tree at any given time, taking into account all the returned data.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sajgak, 2011-04-01
@P0WERMIC

As mentioned above, the tree itself is completely dynamic, but handlers are hung on elements and their events once when your code is called. Therefore, if you want to work without live / bind - hang your functions after the final DOM change.

A
Anatoly, 2011-04-01
@taliban

The Dom tree is updated whenever any element changes. This is not your problem.

S
sajtim, 2020-11-01
@sajtim

Read Anatoly's comment on his own answer, there is a solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question