From 97783bdbd1c7dd0e350910a95674388b3e779cc1 Mon Sep 17 00:00:00 2001 From: John Bender Date: Sun, 27 Mar 2011 23:59:28 -0700 Subject: [PATCH 01/10] added page tracking to history stack and handling for dialog to dialog transitions in hashchange --- js/jquery.mobile.navigation.js | 37 +++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index ecc7e05e..1fb191f3 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -105,13 +105,13 @@ }, // addNew is used whenever a new page is added - addNew: function( url, transition ){ + addNew: function( url, transition, storedTo ){ //if there's forward history, wipe it if( urlHistory.getNext() ){ urlHistory.clearForward(); } - urlHistory.stack.push( {url : url, transition: transition } ); + urlHistory.stack.push( {url : url, transition: transition, page: storedTo } ); urlHistory.activeIndex = urlHistory.stack.length - 1; }, @@ -402,7 +402,7 @@ //add page to history stack if it's not back or forward if( !back && !forward ){ - urlHistory.addNew( url, transition ); + urlHistory.addNew( url, transition, to ); } removeActiveLinkClass(); @@ -764,20 +764,29 @@ return; } - // special case for dialogs requires heading back or forward until we find a non dialog page + // special case for dialogs if( urlHistory.stack.length > 1 && - to.indexOf( dialogHashKey ) > -1 && - !$.mobile.activePage.is( ".ui-dialog" ) ){ + to.indexOf( dialogHashKey ) > -1 ){ - //determine if we're heading forward or backward and continue accordingly past - //the current dialog - urlHistory.directHashChange({ - currentUrl: to, - isBack: function(){ window.history.back(); }, - isForward: function(){ window.history.forward(); } - }); + // If current active page is not a dialog skip the dialog and continue + // in the same direction + if(!$.mobile.activePage.is( ".ui-dialog" )) { + //determine if we're heading forward or backward and continue accordingly past + //the current dialog + urlHistory.directHashChange({ + currentUrl: to, + isBack: function(){ window.history.back(); }, + isForward: function(){ window.history.forward(); } + }); - return; + // prevent changepage + return; + } else { + var setTo = function(){ to = $.mobile.urlHistory.getActive().page; }; + // if the current active page is a dialog and we're navigating + // to a dialog use the dialog objected saved in the stack + urlHistory.directHashChange({ currentUrl: to, isBack: setTo, isForward: setTo }); + } } //if to is defined, load it From 7b4842eabc5c23c84ee5283e1ad4455bde10daa0 Mon Sep 17 00:00:00 2001 From: John Bender Date: Mon, 28 Mar 2011 00:38:22 -0700 Subject: [PATCH 02/10] test for dialogs within dialogs --- tests/unit/navigation/index.html | 15 +++++++++++++++ tests/unit/navigation/navigation_core.js | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/tests/unit/navigation/index.html b/tests/unit/navigation/index.html index 6c0649fd..98410f6a 100644 --- a/tests/unit/navigation/index.html +++ b/tests/unit/navigation/index.html @@ -130,5 +130,20 @@ + +
+
+ Dialog +
+
+ +
+
+ Dialog 2 +
+
+ +
+
diff --git a/tests/unit/navigation/navigation_core.js b/tests/unit/navigation/navigation_core.js index 2832e471..d7d32021 100644 --- a/tests/unit/navigation/navigation_core.js +++ b/tests/unit/navigation/navigation_core.js @@ -295,5 +295,27 @@ start(); }], 1000); }); + + asyncTest( "going back from a dialog triggered from a dialog should result in the first dialog ", function(){ + $.mobile.urlHistory.activeIndex = 0; + $.mobile.urlHistory.stack = []; + $.testHelper.openPage("#nested-dialog-page"); + + $.testHelper.sequence([ + // transition to the dialog + function(){ $("#nested-dialog-page a").click(); }, + + // transition to the second dialog + function(){ $("#nested-dialog-first a").click(); }, + + // transition to back to the first dialog + function(){ window.history.back(); }, + + // make sure we're on first dialog + function(){ + same($(".ui-page-active")[0], $("#nested-dialog-first")[0], "should be the first dialog"); + start(); + }], 1000); + }); })(jQuery); From 50717094adfeb67f7fd7baa020d732d6af996bf6 Mon Sep 17 00:00:00 2001 From: toddparker Date: Mon, 28 Mar 2011 15:42:53 -0400 Subject: [PATCH 03/10] Removed section on non-ajax dialogs, not supported yet. --- docs/pages/docs-dialogs.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/pages/docs-dialogs.html b/docs/pages/docs-dialogs.html index f127ae2c..61e5cff1 100755 --- a/docs/pages/docs-dialogs.html +++ b/docs/pages/docs-dialogs.html @@ -28,11 +28,8 @@

- Open dialog (Ajax) + Open dialog -

To load the dialog as a completely new page instead of pulling it in via Ajax, add rel="external" attribute, just like any standard link. This is useful when linking from a multi-page template to a dialog that's not part of that HTML document. The dialog will by styled exactly like the Ajax version, but there won't be page transition.

- - Open dialog (rel=external)

Transitions

From 3b9a90ee4a2bbae99fcbe97580cbbc44dead2b4c Mon Sep 17 00:00:00 2001 From: scottjehl Date: Mon, 28 Mar 2011 15:55:37 -0400 Subject: [PATCH 04/10] fixed underline on button down state --- themes/default/jquery.mobile.theme.css | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/themes/default/jquery.mobile.theme.css b/themes/default/jquery.mobile.theme.css index fecf2da7..c8c07b05 100755 --- a/themes/default/jquery.mobile.theme.css +++ b/themes/default/jquery.mobile.theme.css @@ -77,7 +77,6 @@ font-weight: bold; color: #fff; text-shadow: 0 -1px 1px #000; - text-decoration: none; background-image: -moz-linear-gradient(top, #555555, #333333); @@ -95,7 +94,6 @@ font-weight: bold; color: #fff; text-shadow: 0 -1px 1px #000; - text-decoration: none; background-image: -moz-linear-gradient(top, #666666, #444444); @@ -128,6 +126,7 @@ .ui-btn-hover-a, .ui-btn-down-a { font-family: Helvetica, Arial, sans-serif; + text-decoration: none; } @@ -197,7 +196,6 @@ font-weight: bold; color: #fff; text-shadow: 0 -1px 1px #145072; - text-decoration: none; background-image: -moz-linear-gradient(top, #4e89c5, #2567ab); @@ -218,7 +216,6 @@ background-image: -moz-linear-gradient(top, #72b0d4, #4b88b6); - text-decoration: none; background-image: -webkit-gradient(linear,left top,left bottom, color-stop(0, #72b0d4), color-stop(1, #4b88b6)); @@ -248,6 +245,7 @@ .ui-btn-hover-b, .ui-btn-down-b { font-family: Helvetica, Arial, sans-serif; + text-decoration: none; } @@ -309,7 +307,6 @@ font-weight: bold; color: #444; text-shadow: 0 1px 1px #f6f6f6; - text-decoration: none; background-image: -moz-linear-gradient(top, #fefefe, #eeeeee); @@ -327,7 +324,6 @@ background: #dadada; font-weight: bold; color: #101010; - text-decoration: none; text-shadow: 0 1px 1px #fff; background-image: -moz-linear-gradient(top, #ededed, @@ -361,6 +357,7 @@ .ui-btn-hover-c, .ui-btn-down-c { font-family: Helvetica, Arial, sans-serif; + text-decoration: none; } @@ -419,7 +416,6 @@ background: #fff; font-weight: bold; color: #444; - text-decoration: none; text-shadow: 0 1px 1px #fff; } .ui-btn-up-d a.ui-link-inherit { @@ -432,7 +428,6 @@ color: #222; cursor: pointer; text-shadow: 0 1px 1px #fff; - text-decoration: none; background-image: -moz-linear-gradient(top, #fdfdfd, #eeeeee); @@ -476,6 +471,7 @@ .ui-btn-hover-d, .ui-btn-down-d { font-family: Helvetica, Arial, sans-serif; + text-decoration: none; } @@ -542,7 +538,6 @@ font-weight: bold; color: #333; text-shadow: 0 1px 1px #fe3; - text-decoration: none; text-shadow: 0 1px 0 #fff; background-image: -moz-linear-gradient(top, #fceda7, @@ -560,7 +555,6 @@ background: #fbe26f; font-weight: bold; color: #111; - text-decoration: none; text-shadow: 0 1px 1px #fff; background-image: -moz-linear-gradient(top, #fcf0b5, @@ -595,6 +589,7 @@ .ui-btn-hover-e, .ui-btn-down-e { font-family: Helvetica, Arial, sans-serif; + text-decoration: none; } From bc005fe18d471c4218aa699ab6cc7a9d75c3cff2 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Mon, 28 Mar 2011 16:07:09 -0400 Subject: [PATCH 05/10] page isn't in use. covered by link-formats.html --- docs/pages/docs-link-scenarios.html | 46 ----------------------------- 1 file changed, 46 deletions(-) delete mode 100755 docs/pages/docs-link-scenarios.html diff --git a/docs/pages/docs-link-scenarios.html b/docs/pages/docs-link-scenarios.html deleted file mode 100755 index 6603c9cb..00000000 --- a/docs/pages/docs-link-scenarios.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - jQuery Mobile Docs - Pages - - - - - - - -
- -
-

Linking pages

- Home -
- -
- -

jQuery Mobile is designed to work with simple page linking conventions. The following list demonstrates how different types of links will be handled, either remotely or through an Ajax Request.

- - - -
-
- - - From 1a2a85773b9acd29c4957396e9e285ef0d516150 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Mon, 28 Mar 2011 16:07:19 -0400 Subject: [PATCH 06/10] fixed a bad path --- docs/pages/link-formats.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/link-formats.html b/docs/pages/link-formats.html index 4430584f..3816f8a3 100755 --- a/docs/pages/link-formats.html +++ b/docs/pages/link-formats.html @@ -32,7 +32,7 @@
  • Links that will refresh the page
  • External domain
  • Link with rel="external"
  • -
  • link with [data-ajax="false"]
  • +
  • link with [data-ajax="false"]
  • Link with target="foo"
  • Email links
  • Basic email: mailto:jdoe@foo.com
  • From 72f4b4a0ca9bd08b84d1a9199313f9c6f9df9c8b Mon Sep 17 00:00:00 2001 From: toddparker Date: Mon, 28 Mar 2011 16:33:29 -0400 Subject: [PATCH 07/10] Fixed link markup on this page. --- docs/lists/lists-split-purchase.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/lists/lists-split-purchase.html b/docs/lists/lists-split-purchase.html index bae232f4..83f6afe8 100755 --- a/docs/lists/lists-split-purchase.html +++ b/docs/lists/lists-split-purchase.html @@ -16,15 +16,14 @@ From cf5676992db3601d2926d5a1c423b434ff7896d1 Mon Sep 17 00:00:00 2001 From: toddparker Date: Mon, 28 Mar 2011 16:43:40 -0400 Subject: [PATCH 08/10] Fixed toolbar demo page, added a sample form and updated list markup to new style --- docs/toolbars/bars-fixed.html | 143 ++++++++++++++++------------------ 1 file changed, 65 insertions(+), 78 deletions(-) diff --git a/docs/toolbars/bars-fixed.html b/docs/toolbars/bars-fixed.html index 19eda90c..bb4ab8a7 100755 --- a/docs/toolbars/bars-fixed.html +++ b/docs/toolbars/bars-fixed.html @@ -13,7 +13,7 @@
    -
    +

    Fixed toolbars

    Home
    @@ -32,96 +32,83 @@ -

    Here is some text to make the page very long

    +

    Some text to make the page very long

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    + +

    And an inset list

    + + + +

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    -

    And an inset list

    +

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    - - -

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    - -

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    - -

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    +
    + + +
    + +
    + + +
    + +
    + + +
    + + +
    + + +
    + + +
    +
    +
    +
    +
    +
    + + +

    A bit more text

    + +

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    -
    +

    Fixed Footer

    From 8fa56b6e85dc338f07c948d6a60804208c200ada Mon Sep 17 00:00:00 2001 From: scottjehl Date: Mon, 28 Mar 2011 18:30:55 -0400 Subject: [PATCH 09/10] Got the sticky footers working again. Markup change noted in first page of demo. Fixes #850 --- docs/toolbars/footer-persist-a.html | 4 +- docs/toolbars/footer-persist-b.html | 142 ++++++++++++++-------------- docs/toolbars/footer-persist-c.html | 110 ++++++++++----------- js/jquery.mobile.fixHeaderFooter.js | 36 +++---- js/jquery.mobile.navbar.js | 4 +- 5 files changed, 151 insertions(+), 145 deletions(-) diff --git a/docs/toolbars/footer-persist-a.html b/docs/toolbars/footer-persist-a.html index a962c904..229d3472 100755 --- a/docs/toolbars/footer-persist-a.html +++ b/docs/toolbars/footer-persist-a.html @@ -20,7 +20,7 @@
    -

    This page is a demo of a persistent footer navigation bar. At the foot of the page, you'll see a persistent horizontal navigation bar. Click on any of the links, and you'll see the page content transition but the footer remain fixed: The footer sticks persistently even when transitioning to a new HTML page, because the footer on all four HTML pages has the same data-id attribute.

    +

    This page is a demo of a persistent footer navigation bar. At the foot of the page, you'll see a persistent horizontal navigation bar. Click on any of the links, and you'll see the page content transition but the footer remain fixed: The footer sticks persistently even when transitioning to a new HTML page, because the footer on all four HTML pages has the same data-id attribute. Note: If you'd like an active button in your navbar to remain active when you return to it again, add a class of ui-state-persist in addition to ui-btn-active

    @@ -67,7 +67,7 @@
    diff --git a/docs/toolbars/footer-persist-b.html b/docs/toolbars/footer-persist-b.html index 95193c9a..2bc38b4b 100755 --- a/docs/toolbars/footer-persist-b.html +++ b/docs/toolbars/footer-persist-b.html @@ -19,75 +19,77 @@
    - +
    @@ -96,7 +98,7 @@ diff --git a/docs/toolbars/footer-persist-c.html b/docs/toolbars/footer-persist-c.html index fd6c959f..bf789015 100755 --- a/docs/toolbars/footer-persist-c.html +++ b/docs/toolbars/footer-persist-c.html @@ -20,59 +20,63 @@
    + +
  • +

    Redfin

    +

    Redfin listing updates for today

    +

    There are 3 updates for the home on your watchlist: 1 updated MLS listing and 2 homes under contract.

    +

    5:52AM

    +
  • +
  • Tuesday, October 5, 2010 3
  • +
  • +

    Angela Smith

    +

    Link Request

    +

    My name is Angela Smith, SEO Consultant. I've greatly enjoyed looking through your site and I was wondering if you'd be interested in providing a link

    +

    6:24AM

    +
  • +
  • +

    Mike Taylor

    +

    This weekend in Maine

    +

    Sounds good, let me check into our plans.

    +

    6:24AM

    +
  • +
    @@ -80,7 +84,7 @@
    diff --git a/js/jquery.mobile.fixHeaderFooter.js b/js/jquery.mobile.fixHeaderFooter.js index 97240cf9..8883736e 100644 --- a/js/jquery.mobile.fixHeaderFooter.js +++ b/js/jquery.mobile.fixHeaderFooter.js @@ -104,21 +104,15 @@ $.fixedToolbars = (function(){ //before page is shown, check for duplicate footer $('.ui-page').live('pagebeforeshow', function(event, ui){ var page = $(event.target), - footer = page.find( ":jqmData(role='footer'):not(.ui-sticky-footer)" ), - id = footer.jqmData('id'); - stickyFooter = null; - if (id) - { - stickyFooter = $( ".ui-footer:jqmData(id='" + id + "').ui-sticky-footer" ); - if (stickyFooter.length == 0) { - // No sticky footer exists for this data-id. We'll use this - // footer as the sticky footer for the group and then create - // a placeholder footer for the page. - stickyFooter = footer; - footer = stickyFooter.clone(); // footer placeholder - stickyFooter.addClass('ui-sticky-footer').before(footer); - } - footer.addClass('ui-footer-duplicate'); + footer = page.find( ":jqmData(role='footer')" ), + id = footer.data('id'), + prevPage = ui.prevPage; + + prevFooter = prevPage && prevPage.find( ":jqmData(role='footer')" ); + var prevFooterMatches = prevFooter.jqmData( "id" ) === id; + + if( prevFooterMatches ){ + stickyFooter = footer; stickyFooter.appendTo($.mobile.pageContainer).css('top',0); setTop(stickyFooter); } @@ -126,8 +120,14 @@ $.fixedToolbars = (function(){ //after page is shown, append footer to new page $('.ui-page').live('pageshow', function(event, ui){ - if( stickyFooter && stickyFooter.length ){ - stickyFooter.appendTo(event.target).css('top',0); + if( stickyFooter && stickyFooter.length ){ + stickyFooter + .appendTo(event.target) + .css('top',0) + .removeClass("fade"); + + stickyFooter = null; + } $.fixedToolbars.show(true, this); }); @@ -202,7 +202,7 @@ $.fixedToolbars = (function(){ if( !alreadyVisible && !immediately ){ el.animationComplete(function(){ - el.removeClass('in'); + el.removeClass('in').addClass("fade"); }).addClass('in'); } setTop(el); diff --git a/js/jquery.mobile.navbar.js b/js/jquery.mobile.navbar.js index 7bd4528c..6b682e1f 100755 --- a/js/jquery.mobile.navbar.js +++ b/js/jquery.mobile.navbar.js @@ -33,8 +33,8 @@ $.widget( "mobile.navbar", $.mobile.widget, { }); $navbar.delegate("a", "click",function(event){ - $navbtns.removeClass( "ui-btn-active" ); - $( this ).addClass( "ui-btn-active" ); + $navbtns.not( ".ui-state-persist" ).removeClass( $.mobile.activeBtnClass ); + $( this ).addClass( $.mobile.activeBtnClass ); }); } }); From 80f81ca6faf5e71a1ab6bf0335e2788a674aada7 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Mon, 28 Mar 2011 20:35:17 -0400 Subject: [PATCH 10/10] improved sticky footers a little bit. Now they don't fade after becoming sticky, but they stick well at least. --- js/jquery.mobile.fixHeaderFooter.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/js/jquery.mobile.fixHeaderFooter.js b/js/jquery.mobile.fixHeaderFooter.js index 8883736e..10cd212b 100644 --- a/js/jquery.mobile.fixHeaderFooter.js +++ b/js/jquery.mobile.fixHeaderFooter.js @@ -113,25 +113,25 @@ $.fixedToolbars = (function(){ if( prevFooterMatches ){ stickyFooter = footer; - stickyFooter.appendTo($.mobile.pageContainer).css('top',0); - setTop(stickyFooter); + setTop( stickyFooter.removeClass("fade").appendTo( $.mobile.pageContainer ) ); } }); //after page is shown, append footer to new page $('.ui-page').live('pageshow', function(event, ui){ - if( stickyFooter && stickyFooter.length ){ - stickyFooter - .appendTo(event.target) - .css('top',0) - .removeClass("fade"); - - stickyFooter = null; - - } - $.fixedToolbars.show(true, this); - }); + var $this = $(this); + if( stickyFooter && stickyFooter.length ){ + + setTimeout(function(){ + setTop( stickyFooter.appendTo( $this ) ); + stickyFooter = null; + },400); + } + + $.fixedToolbars.show(true, this); + }); + // element.getBoundingClientRect() is broken in iOS 3.2.1 on the iPad. The // coordinates inside of the rect it returns don't have the page scroll position @@ -202,7 +202,7 @@ $.fixedToolbars = (function(){ if( !alreadyVisible && !immediately ){ el.animationComplete(function(){ - el.removeClass('in').addClass("fade"); + el.removeClass('in'); }).addClass('in'); } setTop(el);