0

I have a page that utilizes AJAX calls to change its content. Off the bat, I'd like to mention that I don't control the HTML of this page, nor how it works. I simply need to accept the page as it is and put something on top of it to accomplish what I want.

I'm trying to track certain usage aspects of the page and one way to do that is to keep an eye on a particular h3. That's one thing that I know will be on every page and I that I know changes on every page.

Is there a way in jQuery that I can "watch" that h3 and trigger every time its content changes?

Reverend Bubbles
  • 1,363
  • 5
  • 15
  • 29
  • 1
    Possible duplicate of [Jquery Event : Detect changes to the html/text of a div](http://stackoverflow.com/questions/15657686/jquery-event-detect-changes-to-the-html-text-of-a-div) – Clyde Lobo May 25 '16 at 16:05
  • You can use a setInterval() to periodically check the H3, or have the AJAX callback trigger a jQuery function (but like you said,l this might not be an option for you). – rsn May 25 '16 at 16:05
  • @ClydeLobo - I checked that one out. All the answers within were deprecated. – Reverend Bubbles May 25 '16 at 16:12
  • I'd rather not use setInterval. It seems like that would drag down the system. Besides, what would I be checking for in the h3? I just need to capture the change, I'm not checking it against a certain string. It also does the AJAX call in a very odd way. I'm very confused about that part as well. The extremely cryptic code predates me and can't be undone. *sigh* – Reverend Bubbles May 25 '16 at 16:13

0 Answers0