I have a span tag with id='title' and this value changes after sometime. I want to update the page title with this value when it updates.
e.g. <span id='title'>Title</span>
-- This is current title
when after some time it is updated by another script to
<span id='title'>New title</span>
I want to update the title of page to "New title" whenever it changes and no matter how many times it changes.
Right now I have to call function every 1 second to update the page title. Which keeps blinking the page title. So I want to monitor the change and whenever the value changes I want that value to be the title of page.