RSS feed
<< Tim Bray denounces XSD | Home | Sniffing stumbleupon >>

Timed rotating header image

This script will change the header picture every 15 seconds. Start with the default pebble theme and place the script just before the closing tag to the div with an id of "header" in template.jsp.

<script type="text/javascript">
window.setInterval(function() {
  var x = document.getElementById('header').style.backgroundImage='url(themes/user-default/header'+Math.floor(Math.random()*3)+'.jpg)';
},15000);
</script>
Tags :



Add a comment Send a TrackBack
Home