Skip to content

Instantly share code, notes, and snippets.

@procload
Created May 2, 2012 17:19
Show Gist options
  • Save procload/2578406 to your computer and use it in GitHub Desktop.
Save procload/2578406 to your computer and use it in GitHub Desktop.
$('.marker').bind 'click', (e) ->
e.preventDefault
$('.marker .testimonial').fadeOut 100, ->
$(this).parent('.marker').css
"z-index": 1
$(this).children('.testimonial').fadeIn 100, ->
$(this).parent('.marker').css
"z-index": 5
$('.testimonial .close').bind 'click', (e) ->
e.preventDefault
$(this).parent().parent().parent().fadeOut 100, ->
#movement markers
$('.marker').each (index) ->
$(this).delay(300*index).animate({
opacity: 1,
top: '+=30'
}, $(this).data('speed'))
$(this).trigger('click') if index == 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment