John
John

Reputation:

Javascript detect when inner html has changed

I have tried attaching the even onchange and change(with jquery) to an element that updates every couple seconds. Neither of these events are raised when the inner html is changed. How can I detect with with javascript or jquery?

Upvotes: 2

Views: 1204

Answers (2)

nobody
nobody

Reputation: 269

is it updating by ajax? can't you just store the value before the call is made and compare it with what is returned?

Upvotes: 0

Richard JP Le Guen
Richard JP Le Guen

Reputation: 28753

Maybe you're looking for the DOMSubtreeModified event? See the DOM event reference on MDN.

Upvotes: 2

Related Questions