mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-08 08:30:58 +00:00
one call to $.type
This commit is contained in:
parent
8c71ee5dff
commit
b649f17d9d
1 changed files with 4 additions and 3 deletions
|
|
@ -321,9 +321,10 @@
|
|||
// changepage function
|
||||
$.mobile.changePage = function( to, transition, reverse, changeHash, fromHashChange ){
|
||||
//from is always the currently viewed page
|
||||
var toIsArray = $.type(to) === "array",
|
||||
toIsObject = $.type(to) === "object",
|
||||
from = toIsArray ? to[0] : $.mobile.activePage;
|
||||
var toType = $.type(to),
|
||||
toIsArray = toType === "array",
|
||||
toIsObject = toType === "object",
|
||||
from = toIsArray ? to[0] : $.mobile.activePage;
|
||||
|
||||
to = toIsArray ? to[1] : to;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue