views:

22

answers:

0

I do the following steps:

  1. I load a webpage that initiates an ajax call before the page is loaded.
  2. The pages is some time afterwards loaded.
  3. The ajax call finishes 5 seconds after the page is loaded and inserts a new element.
  4. 10 seconds after the page is loaded I want to change the colour of this new element.

Is that possible? and how do it do that using JQuery or any other type of access to the DOM tree.

The problem is: The DOM is not updated when I 10 seconds after load tries(using setTimeout) to get this new element. My DOM inspector in Chrome can see the complete DOM but e.g JQuery can't.

Is it possible to traverse the website elements live somehow?