projects
/
bootswatch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16d1950
)
allow fixed subnav to work with navbars of variable height
author
Thomas Park
<thomas@thomaspark.me>
Tue, 21 Feb 2012 00:20:18 +0000
(19:20 -0500)
committer
Thomas Park
<thomas@thomaspark.me>
Tue, 21 Feb 2012 00:20:18 +0000
(19:20 -0500)
assets/js/application.js
patch
|
blob
|
history
diff --git
a/assets/js/application.js
b/assets/js/application.js
index
732bed4
..
0cd0384
100755
(executable)
--- 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()