From c8a161a04d98b9ec8ab7ff7983f596e76ab1bd27 Mon Sep 17 00:00:00 2001 From: ehynds Date: Tue, 28 Dec 2010 10:15:30 -0500 Subject: [PATCH] same fix in a few other places --- js/jquery.mobile.controlGroup.js | 2 +- js/jquery.mobile.fixHeaderFooter.js | 15 +++++++++------ js/jquery.mobile.grid.js | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/js/jquery.mobile.controlGroup.js b/js/jquery.mobile.controlGroup.js index 49365d70..6a819c94 100644 --- a/js/jquery.mobile.controlGroup.js +++ b/js/jquery.mobile.controlGroup.js @@ -7,7 +7,7 @@ (function($, undefined ) { $.fn.controlgroup = function(options){ - return $(this).each(function(){ + return this.each(function(){ var o = $.extend({ direction: $( this ).data( "type" ) || "vertical", shadow: false diff --git a/js/jquery.mobile.fixHeaderFooter.js b/js/jquery.mobile.fixHeaderFooter.js index 9c69ee3e..049b5814 100644 --- a/js/jquery.mobile.fixHeaderFooter.js +++ b/js/jquery.mobile.fixHeaderFooter.js @@ -6,13 +6,16 @@ */ (function($, undefined ) { $.fn.fixHeaderFooter = function(options){ - if( !$.support.scrollTop ){ return $(this); } - return $(this).each(function(){ - if( $(this).data('fullscreen') ){ $(this).addClass('ui-page-fullscreen'); } - $(this).find('.ui-header[data-position="fixed"]').addClass('ui-header-fixed ui-fixed-inline fade'); //should be slidedown - $(this).find('.ui-footer[data-position="fixed"]').addClass('ui-footer-fixed ui-fixed-inline fade'); //should be slideup + if( !$.support.scrollTop ){ return this; } + + return this.each(function(){ + var $this = $(this); + + if( $this.data('fullscreen') ){ $this.addClass('ui-page-fullscreen'); } + $this.find('.ui-header[data-position="fixed"]').addClass('ui-header-fixed ui-fixed-inline fade'); //should be slidedown + $this.find('.ui-footer[data-position="fixed"]').addClass('ui-footer-fixed ui-fixed-inline fade'); //should be slideup }); -}; +}; //single controller for all showing,hiding,toggling $.fixedToolbars = (function(){ diff --git a/js/jquery.mobile.grid.js b/js/jquery.mobile.grid.js index 8fee7090..a76b2d51 100644 --- a/js/jquery.mobile.grid.js +++ b/js/jquery.mobile.grid.js @@ -6,7 +6,7 @@ */ (function($, undefined ) { $.fn.grid = function(options){ - return $(this).each(function(){ + return this.each(function(){ var o = $.extend({ grid: null },options);