Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cached window in show/hide functions, since I was in the neighborhood.

  • Loading branch information...
commit 201058bc90086f7c790c76e1e67c7f6676d4afd1 1 parent 1609ea1
@Wilto Wilto authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 js/jquery.mobile.fixedToolbar.js
View
10 js/jquery.mobile.fixedToolbar.js
@@ -132,10 +132,11 @@ define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.core", "jquery.mobile
show: function(){
var hideClass = "ui-fixed-hidden",
$el = this.element,
- scroll = $( window ).scrollTop(),
+ $win = $( window ),
+ scroll = $win.scrollTop(),
elHeight = $el.height(),
pHeight = $el.closest( ".ui-page" ).height(),
- viewportHeight = Math.min( screen.height, $( window ).height() ),
+ viewportHeight = Math.min( screen.height, $win.height() ),
tbtype = $el.is( ".ui-header" ) ? "header" : "footer";
if( this.options.transition && this.options.transition !== "none" &&
@@ -156,10 +157,11 @@ define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.core", "jquery.mobile
hide: function(){
var hideClass = "ui-fixed-hidden",
$el = this.element,
- scroll = $( window ).scrollTop(),
+ $win = $( window ),
+ scroll = $win.scrollTop(),
elHeight = $el.height(),
pHeight = $el.closest( ".ui-page" ).height(),
- viewportHeight = Math.min( screen.height, $( window ).height() ),
+ viewportHeight = Math.min( screen.height, $win.height() ),
tbtype = $el.is( ".ui-header" ) ? "header" : "footer";
if( this.options.transition && this.options.transition !== "none" &&
Please sign in to comment.
Something went wrong with that request. Please try again.