Skip to content

Instantly share code, notes, and snippets.

@arbales
Created August 24, 2011 23:21
Show Gist options
  • Select an option

  • Save arbales/1169566 to your computer and use it in GitHub Desktop.

Select an option

Save arbales/1169566 to your computer and use it in GitHub Desktop.
_.cycle = (arr) ->
->
arr.push arr.shift()
arr[0]
next_image = _.cycle ['/images/pages/sfstreet.jpg', '/images/pages/skyrise.jpg', '/images/pages/gate.jpg']
$(document).ready ->
b = new Backstretch next_image(), {speed: 2000}
new Apollo.Utils.PeriodicalExecuter ->
b.change_source next_image()
, 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment