Modified to allow for pages to have a data-back attribute which provides a way to use backward transition manually.

This commit is contained in:
wuyuntao 2010-10-18 18:10:38 +08:00 committed by scottjehl
parent fcfeb56c6b
commit 205364620d

View file

@ -46,6 +46,7 @@
startPageId = 'ui-page-start',
activePageClass = 'ui-page-active',
pageTransition,
forceBack,
transitions = 'slide slideup slidedown pop flip fade',
transitionDuration = 350,
backBtnText = "Back",
@ -102,6 +103,7 @@
jQuery.fn.ajaxClick = function() {
var href = jQuery( this ).attr( "href" );
pageTransition = jQuery( this ).data( "transition" ) || "slide";
forceBack = jQuery( this ).data( "back" ) || undefined;
nextPageRole = jQuery( this ).attr( "data-rel" );
//find new base for url building
@ -223,7 +225,9 @@
transition = urlStack.pop().transition;
} else {
urlStack.push({ url: url, transition: transition });
if ( forceBack ) back = true;
}
forceBack = undefined;
//function for setting role of next page
function setPageRole( newPage ) {