diff options
author | Thomas Park <thomas@thomaspark.me> | 2012-02-20 19:20:18 -0500 |
---|---|---|
committer | Thomas Park <thomas@thomaspark.me> | 2012-02-20 19:20:18 -0500 |
commit | 5c36dc0d80aa5065ae041b9381b2363a3c3aab9f (patch) | |
tree | 413784dd4266c308e8b8fc86e48ec048075435f3 /assets | |
parent | 16d19505837f0a0927b7731bdc8efc20f63bc30f (diff) |
allow fixed subnav to work with navbars of variable height
Diffstat (limited to 'assets')
-rwxr-xr-x | assets/js/application.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/js/application.js b/assets/js/application.js index 732bed45..0cd03842 100755 --- a/assets/js/application.js +++ b/assets/js/application.js @@ -46,7 +46,8 @@ // fix sub nav on scroll var $win = $(window) , $nav = $('.subnav') - , navTop = $('.subnav').length && $('.subnav').offset().top - 40 + , navHeight = $('.navbar').first().height() + , navTop = $('.subnav').length && $('.subnav').offset().top - navHeight , isFixed = 0 processScroll() |