mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +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 ){
|
||||
|
||||
// determine new page index
|
||||
var newActiveIndex = null;
|
||||
var newActiveIndex;
|
||||
|
||||
// check if url is in history and if it's ahead or behind current page
|
||||
$.each( urlHistory.stack, function( i ){
|
||||
|
|
@ -304,7 +304,7 @@
|
|||
});
|
||||
|
||||
// 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( back ){
|
||||
|
|
|
|||
Loading…
Reference in a new issue