mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Cached window in show/hide functions, since I was in the neighborhood.
This commit is contained in:
parent
1609ea10e7
commit
201058bc90
1 changed files with 6 additions and 4 deletions
|
|
@ -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" &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue