I do the following steps:
- I load a webpage that initiates an ajax call before the page is loaded.
- The pages is some time afterwards loaded.
- The ajax call finishes 5 seconds after the page is loaded and inserts a new element.
- 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?