This repository was archived by the owner on Oct 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
demos/toolbar-fixed-persistent Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 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">
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments