mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-19 15:30:24 +00:00
small refactor to simplify newActiveIndex tracking
This commit is contained in:
parent
86befdeaed
commit
20dce2ce42
1 changed files with 2 additions and 2 deletions
|
|
@ -288,7 +288,7 @@
|
||||||
if( fromHashChange ){
|
if( fromHashChange ){
|
||||||
|
|
||||||
// determine new page index
|
// determine new page index
|
||||||
var newActiveIndex = null;
|
var newActiveIndex;
|
||||||
|
|
||||||
// check if url is in history and if it's ahead or behind current page
|
// check if url is in history and if it's ahead or behind current page
|
||||||
$.each( urlHistory.stack, function( i ){
|
$.each( urlHistory.stack, function( i ){
|
||||||
|
|
@ -304,7 +304,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// save new page index
|
// save new page index
|
||||||
urlHistory.activeIndex = ( newActiveIndex != null ? newActiveIndex : urlHistory.activeIndex );
|
urlHistory.activeIndex = newActiveIndex ? newActiveIndex : urlHistory.activeIndex;
|
||||||
|
|
||||||
//if it's a back, use reverse animation
|
//if it's a back, use reverse animation
|
||||||
if( back ){
|
if( back ){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue