@@ -34,8 +34,7 @@ $.fixedToolbars = (function(){
3434 scrollTriggered = false ,
3535 touchToggleEnabled = true ;
3636
37- function showEventCallback ( event )
38- {
37+ function showEventCallback ( event ) {
3938 // An event that affects the dimensions of the visual viewport has
4039 // been triggered. If the header and/or footer for the current page are in overlay
4140 // mode, we want to hide them, and then fire off a timer to show them at a later
@@ -80,10 +79,10 @@ $.fixedToolbars = (function(){
8079
8180*/
8281
83- ( ( $ ( document ) . scrollTop ( ) == 0 ) ? $ ( window ) : $ ( document ) )
82+ ( ( $ ( document ) . scrollTop ( ) === 0 ) ? $ ( window ) : $ ( document ) )
8483 . bind ( 'scrollstart' , function ( event ) {
8584 scrollTriggered = true ;
86- if ( stateBefore == null ) { stateBefore = currentstate ; }
85+ if ( stateBefore === null ) { stateBefore = currentstate ; }
8786
8887 // We only enter autoHideMode if the headers/footers are in
8988 // an overlay state or the show timer was started. If the
@@ -152,18 +151,14 @@ $.fixedToolbars = (function(){
152151 //
153152 // TODO: We'll need to get rid of getOffsetTop() once a fix gets folded into core.
154153
155- function getOffsetTop ( ele )
156- {
154+ function getOffsetTop ( ele ) {
157155 var top = 0 ;
158- if ( ele )
159- {
156+ if ( ele ) {
160157 var op = ele . offsetParent , body = document . body ;
161158 top = ele . offsetTop ;
162- while ( ele && ele != body )
163- {
159+ while ( ele && ele != body ) {
164160 top += ele . scrollTop || 0 ;
165- if ( ele == op )
166- {
161+ if ( ele == op ) {
167162 top += op . offsetTop ;
168163 op = ele . offsetParent ;
169164 }
0 commit comments