Re: When a string inside a div changes do something
Posted: Sat Apr 17, 2010 5:02 pm
what's the content of the setInterval callback...
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
//Set the start value (could be empty)
var title = document.getElementById('cc_stream_info_song').innerHTML;
function check() {
var currentTitle = document.getElementById('cc_stream_info_song').innerHTML;
if(title != currentTitle) {
//get artist information
title = currentTitle; //Update the variable to the current content
}
}
setInterval(check, 10000);