Skip to content

Instantly share code, notes, and snippets.

@arbales
Created August 30, 2011 04:23
Show Gist options
  • Select an option

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

Select an option

Save arbales/1180182 to your computer and use it in GitHub Desktop.
# Read more at coffeescript.org
$ -> # $(function() {...}
# Note: you had an extra call fo $(document).ready. The call above is actually the same thing.
$('.wrapper').css 'overflow-x', 'hidden'
$('#slider-name a').click ->
$('#slider-nav a').removeClass 'selected'
$(this).addClass 'selected'
opts =
duration: 500
offset:
top: -30
$('.wrapper').scrollTo $(this).attr('href'), opts
false
$('.end a').click ->
$('.wrapper').scrollTo $('.slide li', opts)
$('.selected').removeClass 'selected'
$('#slider-nav a:first').addClass 'selected'
false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment