Skip to content

Commit

Permalink
Toolbar: Demo persistent toolbar active state fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cgack authored and agcolom committed Nov 26, 2014
1 parent 1cd20a7 commit d8cdd43
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion demos/toolbar-fixed-persistent/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: <div data-role="page" data-title="Info">
Expand Down
4 changes: 2 additions & 2 deletions demos/toolbar-fixed-persistent/page-b.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: <div data-role="page" data-title="Info">
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
Expand Down
4 changes: 2 additions & 2 deletions demos/toolbar-fixed-persistent/page-c.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: <div data-role="page" data-title="Info">
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
Expand Down
4 changes: 2 additions & 2 deletions demos/toolbar-fixed-persistent/page-d.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: <div data-role="page" data-title="Info">
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
Expand Down

0 comments on commit d8cdd43

Please sign in to comment.