Created
December 7, 2011 00:15
-
-
Save bvibber/1440752 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$statusbar = $('#status-top'); | |
// Only do the rest if we have the statusbar! | |
if ($statusbar.length > 0) { | |
function updateOnlineStatusBar() { | |
// ... code to fetch and update | |
} | |
// Update the status every couple minutes if we leave the page open | |
window.setInterval(updateOnlineStatusBar(), 120 * 1000); | |
updateOnlineStatusBar(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment