File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,17 @@ $(function() {
54
54
// Draw the sidebar
55
55
redraw ( ) ;
56
56
57
+ // sticky header
58
+ var $title = $ ( 'section#main h1' ) ;
59
+ var headOffset = 50 ;
60
+ $ ( window ) . scroll ( function ( ) {
61
+ if ( $ ( window ) . scrollTop ( ) > headOffset ) {
62
+ $title . addClass ( "fixed_top" ) ;
63
+ } else {
64
+ $title . removeClass ( "fixed_top" ) ;
65
+ }
66
+ } ) ;
67
+
57
68
// Hide tutorials if the user clicks on a facet
58
69
$ ( "nav li" ) . live ( "click" , function ( e ) {
59
70
target = $ ( this ) . data ( ) ;
Original file line number Diff line number Diff line change @@ -201,6 +201,18 @@ section#main {
201
201
padding-bottom : 50px ;
202
202
}
203
203
204
+ section # main h1 .fixed_top {
205
+ position : fixed;
206
+ top : 0px ;
207
+ z-index : 100 ;
208
+ width : 560px ;
209
+ padding : 10px 0 ;
210
+ -moz-box-shadow : 0px 5px 10px # FFF ;
211
+ -webkit-box-shadow : 0px 5px 10px # FFF ;
212
+ box-shadow : 0px 5px 10px # FFF ;
213
+ background : # FFF ;
214
+ }
215
+
204
216
small {
205
217
font-size : 11px ;
206
218
}
You can’t perform that action at this time.
0 commit comments