Skip to content

Instantly share code, notes, and snippets.

@aza
Created June 24, 2011 03:03
Show Gist options
  • Save aza/1044137 to your computer and use it in GitHub Desktop.
Save aza/1044137 to your computer and use it in GitHub Desktop.
var bling = $('.bling'),
ratingWidth = 320
var lastTime = new Date()
$(function() {
bling.show()
var animateBling = function () {
console.log( "Elapsed: " + (new Date() - lastTime) )
lastTime = new Date()
bling
.attr('left', - bling.attr( 'width' ))
.animate({
left: ratingWidth,
duration: 1000
}, function() {
setTimeout(animateBling, 5000)
})
setTimeout(animateBling, 5000)
}
animateBling()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment