Catch the text changed event


Baseband Member
On this Minecraft server control panel website (which I didn't write), you can see the amount of players currently logged into the server in the 'Online Players 0/8' section at the top right.

I want to listen to the DOM for changes in that particular 'Online players' text. If the number changes to anything greater than '0 players online', I want to generate an alert('new player!'); on my client (not on the server) and possibly play a sound.

Here's what I know:
The control panel seems to be refreshing (polling) the 'status_onlineplayers' td element every second. If you inspect that element, you get this code:
<td id="status_onlineplayers">0 / 8</td>

What would be the best approach to do this? What scripting languages? I prefer to work with languages I already know such as Javascript. I read online it should be possible with jQuery.
Top Bottom