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