Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 62695d4

Browse files
cgackarschmitz
authored andcommitted
Toolbar: Demo persistent toolbar active state fix
Fixes gh-7578 Closes gh-7584 (cherry picked from commit 2637803)
1 parent a3b0f79 commit 62695d4

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

demos/toolbar-fixed-persistent/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
$( "[data-role='header'], [data-role='footer']" ).toolbar();
1818
});
1919
// Update the contents of the toolbars
20-
$( document ).on( "pagecontainershow", function() {
20+
$( document ).on( "pagecontainerchange", function() {
2121
// Each of the four pages in this demo has a data-title attribute
2222
// which value is equal to the text of the nav button
2323
// For example, on first page: <div data-role="page" data-title="Info">

demos/toolbar-fixed-persistent/page-b.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
$( "[data-role='header'], [data-role='footer']" ).toolbar();
1818
});
1919
// Update the contents of the toolbars
20-
$( document ).on( "pageshow", "[data-role='page']", function() {
20+
$( document ).on( "pagecontainerchange", function() {
2121
// Each of the four pages in this demo has a data-title attribute
2222
// which value is equal to the text of the nav button
2323
// For example, on first page: <div data-role="page" data-title="Info">
24-
var current = $( this ).jqmData( "title" );
24+
var current = $( ".ui-page-active" ).jqmData( "title" );
2525
// Change the heading
2626
$( "[data-role='header'] h1" ).text( current );
2727
// Remove active class from nav buttons

demos/toolbar-fixed-persistent/page-c.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
$( "[data-role='header'], [data-role='footer']" ).toolbar();
1818
});
1919
// Update the contents of the toolbars
20-
$( document ).on( "pageshow", "[data-role='page']", function() {
20+
$( document ).on( "pagecontainerchange", function() {
2121
// Each of the four pages in this demo has a data-title attribute
2222
// which value is equal to the text of the nav button
2323
// For example, on first page: <div data-role="page" data-title="Info">
24-
var current = $( this ).jqmData( "title" );
24+
var current = $( ".ui-page-active" ).jqmData( "title" );
2525
// Change the heading
2626
$( "[data-role='header'] h1" ).text( current );
2727
// Remove active class from nav buttons

demos/toolbar-fixed-persistent/page-d.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
$( "[data-role='header'], [data-role='footer']" ).toolbar();
1818
});
1919
// Update the contents of the toolbars
20-
$( document ).on( "pageshow", "[data-role='page']", function() {
20+
$( document ).on( "pagecontainerchange", function() {
2121
// Each of the four pages in this demo has a data-title attribute
2222
// which value is equal to the text of the nav button
2323
// For example, on first page: <div data-role="page" data-title="Info">
24-
var current = $( this ).jqmData( "title" );
24+
var current = $( ".ui-page-active" ).jqmData( "title" );
2525
// Change the heading
2626
$( "[data-role='header'] h1" ).text( current );
2727
// Remove active class from nav buttons

0 commit comments

Comments
 (0)