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 17
17
$( " [data-role='header'], [data-role='footer']" ). toolbar ();
18
18
} );
19
19
// Update the contents of the toolbars
20
- $( document ).on( "pagecontainershow ", function() {
20
+ $( document ).on( "pagecontainerchange ", function() {
21
21
// Each of the four pages in this demo has a data-title attribute
22
22
// which value is equal to the text of the nav button
23
23
// For example, on first page: <div data-role="page" data-title="Info">
Original file line number Diff line number Diff line change 17
17
$( " [data-role='header'], [data-role='footer']" ). toolbar ();
18
18
} );
19
19
// Update the contents of the toolbars
20
- $( document ).on( "pageshow", "[data-role='page'] ", function() {
20
+ $( document ).on( "pagecontainerchange ", function() {
21
21
// Each of the four pages in this demo has a data-title attribute
22
22
// which value is equal to the text of the nav button
23
23
// 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" );
25
25
// Change the heading
26
26
$( " [data-role='header'] h1" ). text ( current );
27
27
// Remove active class from nav buttons
Original file line number Diff line number Diff line change 17
17
$( " [data-role='header'], [data-role='footer']" ). toolbar ();
18
18
} );
19
19
// Update the contents of the toolbars
20
- $( document ).on( "pageshow", "[data-role='page'] ", function() {
20
+ $( document ).on( "pagecontainerchange ", function() {
21
21
// Each of the four pages in this demo has a data-title attribute
22
22
// which value is equal to the text of the nav button
23
23
// 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" );
25
25
// Change the heading
26
26
$( " [data-role='header'] h1" ). text ( current );
27
27
// Remove active class from nav buttons
Original file line number Diff line number Diff line change 17
17
$( " [data-role='header'], [data-role='footer']" ). toolbar ();
18
18
} );
19
19
// Update the contents of the toolbars
20
- $( document ).on( "pageshow", "[data-role='page'] ", function() {
20
+ $( document ).on( "pagecontainerchange ", function() {
21
21
// Each of the four pages in this demo has a data-title attribute
22
22
// which value is equal to the text of the nav button
23
23
// 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" );
25
25
// Change the heading
26
26
$( " [data-role='header'] h1" ). text ( current );
27
27
// Remove active class from nav buttons
You can’t perform that action at this time.
0 commit comments