File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ $(document).ready(function(){
143143 } ) ;
144144
145145 var menuIndexTop = $ ( '#menuIndex' ) . offset ( ) . top ;
146+ var menuIndexLeft = $ ( '#menuIndex' ) . offset ( ) . left ;
146147
147148 $ ( window ) . scroll ( function ( ) {
148149 waitForFinalEvent ( function ( ) {
@@ -154,11 +155,13 @@ $(document).ready(function(){
154155 $ ( '#menuIndex' ) . css ( {
155156 position :'fixed'
156157 , top :'20px'
158+ , left :menuIndexLeft
157159 } ) ;
158160 } else {
159161 $ ( '#menuIndex' ) . css ( {
160162 position :'static'
161163 , top :0
164+ , left :0
162165 } ) ;
163166 }
164167
@@ -178,6 +181,16 @@ $(document).ready(function(){
178181 } ) ;
179182
180183 $ ( window ) . resize ( function ( ) {
184+ $ ( '#menuIndex' ) . css ( {
185+ position :'static'
186+ , top :0
187+ , left :0
188+ } ) ;
189+
190+ menuIndexTop = $ ( '#menuIndex' ) . offset ( ) . top ;
191+ menuIndexLeft = $ ( '#menuIndex' ) . offset ( ) . left ;
192+
193+ $ ( window ) . trigger ( 'scroll' )
181194 $ ( '#menuIndex' ) . css ( 'max-height' , $ ( window ) . height ( ) - 80 ) ;
182195 } ) ;
183196 } )
You can’t perform that action at this time.
0 commit comments