Skip to content

Instantly share code, notes, and snippets.

@denysonique
Created September 17, 2013 06:12
Show Gist options
  • Save denysonique/6590647 to your computer and use it in GitHub Desktop.
Save denysonique/6590647 to your computer and use it in GitHub Desktop.
setTimout ->
$('#foo').fadeOut 200, ->
$('.bar').css background: 'red'
console.log 'done'
,1000
# VS
delay = (ms, cb)-> setTimeout(cb, ms)
delay 1000, ->
$('#foo').fadeOut 200, ->
$('.bar').css background: 'red'
console.log 'done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment