From 22cf5bd2240bb923371ddae80df4a8e1a922bb65 Mon Sep 17 00:00:00 2001 From: Cory Gackenheimer Date: Wed, 23 Jul 2014 13:13:34 -0400 Subject: [PATCH] Demos: persistent toolbar active state fix Fixes gh-7578 --- demos/toolbar-fixed-persistent/index.php | 2 +- demos/toolbar-fixed-persistent/page-b.php | 4 ++-- demos/toolbar-fixed-persistent/page-c.php | 4 ++-- demos/toolbar-fixed-persistent/page-d.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/demos/toolbar-fixed-persistent/index.php b/demos/toolbar-fixed-persistent/index.php index 176fa197707..86a9ae2c291 100644 --- a/demos/toolbar-fixed-persistent/index.php +++ b/demos/toolbar-fixed-persistent/index.php @@ -17,7 +17,7 @@ $( "[data-role='header'], [data-role='footer']" ).toolbar(); }); // Update the contents of the toolbars - $( document ).on( "pagecontainershow", function() { + $( document ).on( "pagecontainerchange", function() { // Each of the four pages in this demo has a data-title attribute // which value is equal to the text of the nav button // For example, on first page:
diff --git a/demos/toolbar-fixed-persistent/page-b.php b/demos/toolbar-fixed-persistent/page-b.php index 94339770ce4..931ad48c9ee 100644 --- a/demos/toolbar-fixed-persistent/page-b.php +++ b/demos/toolbar-fixed-persistent/page-b.php @@ -17,11 +17,11 @@ $( "[data-role='header'], [data-role='footer']" ).toolbar(); }); // Update the contents of the toolbars - $( document ).on( "pageshow", "[data-role='page']", function() { + $( document ).on( "pagecontainerchange", function() { // Each of the four pages in this demo has a data-title attribute // which value is equal to the text of the nav button // For example, on first page:
- var current = $( this ).jqmData( "title" ); + var current = $( ".ui-page-active" ).jqmData( "title" ); // Change the heading $( "[data-role='header'] h1" ).text( current ); // Remove active class from nav buttons diff --git a/demos/toolbar-fixed-persistent/page-c.php b/demos/toolbar-fixed-persistent/page-c.php index 03fbbad4cef..bb3abab33a8 100644 --- a/demos/toolbar-fixed-persistent/page-c.php +++ b/demos/toolbar-fixed-persistent/page-c.php @@ -17,11 +17,11 @@ $( "[data-role='header'], [data-role='footer']" ).toolbar(); }); // Update the contents of the toolbars - $( document ).on( "pageshow", "[data-role='page']", function() { + $( document ).on( "pagecontainerchange", function() { // Each of the four pages in this demo has a data-title attribute // which value is equal to the text of the nav button // For example, on first page:
- var current = $( this ).jqmData( "title" ); + var current = $( ".ui-page-active" ).jqmData( "title" ); // Change the heading $( "[data-role='header'] h1" ).text( current ); // Remove active class from nav buttons diff --git a/demos/toolbar-fixed-persistent/page-d.php b/demos/toolbar-fixed-persistent/page-d.php index d1258357e98..418b7b858dd 100644 --- a/demos/toolbar-fixed-persistent/page-d.php +++ b/demos/toolbar-fixed-persistent/page-d.php @@ -17,11 +17,11 @@ $( "[data-role='header'], [data-role='footer']" ).toolbar(); }); // Update the contents of the toolbars - $( document ).on( "pageshow", "[data-role='page']", function() { + $( document ).on( "pagecontainerchange", function() { // Each of the four pages in this demo has a data-title attribute // which value is equal to the text of the nav button // For example, on first page:
- var current = $( this ).jqmData( "title" ); + var current = $( ".ui-page-active" ).jqmData( "title" ); // Change the heading $( "[data-role='header'] h1" ).text( current ); // Remove active class from nav buttons