Skip to content

Instantly share code, notes, and snippets.

@leonardorb
Created February 18, 2013 14:28
Show Gist options
  • Save leonardorb/4977807 to your computer and use it in GitHub Desktop.
Save leonardorb/4977807 to your computer and use it in GitHub Desktop.
require.config
paths:
'jquery' : 'libs/jquery/jquery'
require(['jquery', 'topbar'], ($, topbar) ->
$ () ->
navBar = $('nav.main-navigation')
navOffsetTop = navBar.offset().top
$(window).scroll ->
topbar.fixedNavigation(navOffsetTop)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment