Skip to content

Instantly share code, notes, and snippets.

@stoplion
Created January 5, 2012 14:05
Show Gist options
  • Save stoplion/1565392 to your computer and use it in GitHub Desktop.
Save stoplion/1565392 to your computer and use it in GitHub Desktop.
Animation for vegas sign (flashing light, background animation toggle)
$(document).ready ->
$('.signup_sign').css('top', '-200px').animate({"top": "-13px"}, 1500)
signup_sign = $('.signup_sign')
light = off
window.setInterval ( ->
if light is off
$(signup_sign).css 'background-position', "-141px 0"
light = on
else if light is on
$(signup_sign).css 'background-position', "0 0"
light = off
), 2000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment