diff --git a/css/structure/jquery.mobile.core.css b/css/structure/jquery.mobile.core.css index 957760df..6a94a822 100644 --- a/css/structure/jquery.mobile.core.css +++ b/css/structure/jquery.mobile.core.css @@ -42,9 +42,6 @@ div.ui-mobile-viewport { overflow-x: hidden; } /* some level of transform keeps elements from blinking out of visibility on iOS */ -webkit-transform: rotateY(0); } -.ui-page.ui-mobile-pre-transition { - display: block; -} .ui-mobile-touch-overflow.ui-native-fixed .ui-content .ui-listview { margin-top: 0; } @@ -63,13 +60,11 @@ div.ui-mobile-viewport { overflow-x: hidden; } } /* loading screen */ -.ui-loading .ui-mobile-viewport { overflow: hidden !important; } .ui-loading .ui-loader { display: block; } -.ui-loading .ui-page { overflow: hidden; } -.ui-loader { display: none; position: absolute; opacity: .85; z-index: 100; left: 50%; width: 200px; margin-left: -130px; margin-top: -35px; padding: 10px 30px; } -.ui-loader h1 { font-size: 15px; text-align: center; } -.ui-loader .ui-icon { position: static; display: block; opacity: .9; margin: 0 auto; width: 35px; height: 35px; background-color: transparent; } - +.ui-loader { background-color: #000; opacity: .18; display: none; z-index: 9999999; position: fixed; width: 46px; height: 46px; top: 50%; box-shadow: 0 1px 1px -1px #fff; margin-left: -18px; margin-top: -18px; left: 50%; padding: 1px; border:0; -webkit-border-radius: 36px; -moz-border-radius: 36px; border-radius: 36px; } +.ui-loader h1 { font-size: 0px; width: 0; height: 0; overflow: hidden; } +.ui-loader .ui-icon { display: block; margin: 0; width: 46px; height: 46px; background-color: transparent; } +.ui-loader-fakefix { position: absolute; } /*fouc*/ .ui-mobile-rendering > * { visibility: hidden; } diff --git a/css/structure/jquery.mobile.dialog.css b/css/structure/jquery.mobile.dialog.css index 8f27f44e..6de24927 100644 --- a/css/structure/jquery.mobile.dialog.css +++ b/css/structure/jquery.mobile.dialog.css @@ -1,5 +1,7 @@ .ui-dialog { width: 92.5%; max-width: 500px; margin: 10% auto 15px auto; padding: 0; } - +.ui-dialog-page { + background: none !important; /* this is to ensure that dialog theming does not apply (by default at least) on the page div */ +} .ui-dialog .ui-header { margin-top: 15%; } @@ -12,8 +14,11 @@ } .ui-dialog .ui-header, .ui-dialog .ui-footer { - padding: 0 15px; z-index: 10; + padding: 0; +} +.ui-dialog .ui-footer { + padding: 0 15px; } .ui-dialog .ui-content { padding: 15px; diff --git a/css/structure/jquery.mobile.transitions.css b/css/structure/jquery.mobile.transitions.css index 503baa32..7bccb841 100644 --- a/css/structure/jquery.mobile.transitions.css +++ b/css/structure/jquery.mobile.transitions.css @@ -1,159 +1,4 @@ -.spin { - -webkit-transform: rotate(360deg); - -webkit-animation-name: spin; - -webkit-animation-duration: 1s; - -webkit-animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; -} -@-webkit-keyframes spin { - from {-webkit-transform: rotate(0deg);} - to {-webkit-transform: rotate(360deg);} -} - -/* Transitions from jQtouch (with small modifications): http://www.jqtouch.com/ -Built by David Kaneda and maintained by Jonathan Stark. -*/ -.in, .out { - -webkit-animation-timing-function: ease-in-out; - -webkit-animation-duration: 350ms; -} - - -.slide.out { - -webkit-transform: translateX(-100%); - -webkit-animation-name: slideouttoleft; -} - -.slide.in { - -webkit-transform: translateX(0); - -webkit-animation-name: slideinfromright; -} - -.slide.out.reverse { - -webkit-transform: translateX(100%); - -webkit-animation-name: slideouttoright; -} - -.slide.in.reverse { - -webkit-transform: translateX(0); - -webkit-animation-name: slideinfromleft; -} - -.slideup.out { - -webkit-animation-name: dontmove; - z-index: 0; -} - -.slideup.in { - -webkit-transform: translateY(0); - -webkit-animation-name: slideinfrombottom; - z-index: 10; -} - -.slideup.in.reverse { - z-index: 0; - -webkit-animation-name: dontmove; -} - -.slideup.out.reverse { - -webkit-transform: translateY(100%); - z-index: 10; - -webkit-animation-name: slideouttobottom; -} - -.slidedown.out { - -webkit-animation-name: dontmove; - z-index: 0; -} - -.slidedown.in { - -webkit-transform: translateY(0); - -webkit-animation-name: slideinfromtop; - z-index: 10; -} - -.slidedown.in.reverse { - z-index: 0; - -webkit-animation-name: dontmove; -} - -.slidedown.out.reverse { - -webkit-transform: translateY(-100%); - z-index: 10; - -webkit-animation-name: slideouttotop; -} - -@-webkit-keyframes slideinfromright { - from { -webkit-transform: translateX(100%); } - to { -webkit-transform: translateX(0); } -} - -@-webkit-keyframes slideinfromleft { - from { -webkit-transform: translateX(-100%); } - to { -webkit-transform: translateX(0); } -} - -@-webkit-keyframes slideouttoleft { - from { -webkit-transform: translateX(0); } - to { -webkit-transform: translateX(-100%); } -} - -@-webkit-keyframes slideouttoright { - from { -webkit-transform: translateX(0); } - to { -webkit-transform: translateX(100%); } -} - -@-webkit-keyframes slideinfromtop { - from { -webkit-transform: translateY(-100%); } - to { -webkit-transform: translateY(0); } -} - -@-webkit-keyframes slideinfrombottom { - from { -webkit-transform: translateY(100%); } - to { -webkit-transform: translateY(0); } -} - -@-webkit-keyframes slideouttobottom { - from { -webkit-transform: translateY(0); } - to { -webkit-transform: translateY(100%); } -} - -@-webkit-keyframes slideouttotop { - from { -webkit-transform: translateY(0); } - to { -webkit-transform: translateY(-100%); } -} -@-webkit-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } -} - -@-webkit-keyframes fadeout { - from { opacity: 1; } - to { opacity: 0; } -} - -.fade.out { - z-index: 0; - -webkit-animation-name: fadeout; -} - -.fade.in { - opacity: 1; - z-index: 10; - -webkit-animation-name: fadein; -} - -/* The properties in this rule are only necessary for the 'flip' transition. - * We need specify the perspective to create a projection matrix. This will add - * some depth as the element flips. The depth number represents the distance of - * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate - * value. - */ -.viewport-flip { - -webkit-perspective: 1000; - position: absolute; -} - +/* Transitions originally inspired by those from jQtouch, nice work, folks */ .ui-mobile-viewport-transitioning, .ui-mobile-viewport-transitioning .ui-page { width: 100%; @@ -161,103 +6,16 @@ Built by David Kaneda and maintained by Jonathan Stark. overflow: hidden; } -.flip { - -webkit-animation-duration: .65s; - -webkit-backface-visibility:hidden; - -webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ +.in { + -webkit-animation-timing-function: ease-out; + -webkit-animation-duration: 350ms; + -moz-animation-timing-function: ease-out; + -moz-animation-duration: 350ms; } -.flip.out { - -webkit-transform: rotateY(-180deg) scale(.8); - -webkit-animation-name: flipouttoleft; -} - -.flip.in { - -webkit-transform: rotateY(0) scale(1); - -webkit-animation-name: flipinfromleft; -} - -/* Shake it all about */ - -.flip.out.reverse { - -webkit-transform: rotateY(180deg) scale(.8); - -webkit-animation-name: flipouttoright; -} - -.flip.in.reverse { - -webkit-transform: rotateY(0) scale(1); - -webkit-animation-name: flipinfromright; -} - -@-webkit-keyframes flipinfromright { - from { -webkit-transform: rotateY(-180deg) scale(.8); } - to { -webkit-transform: rotateY(0) scale(1); } -} - -@-webkit-keyframes flipinfromleft { - from { -webkit-transform: rotateY(180deg) scale(.8); } - to { -webkit-transform: rotateY(0) scale(1); } -} - -@-webkit-keyframes flipouttoleft { - from { -webkit-transform: rotateY(0) scale(1); } - to { -webkit-transform: rotateY(-180deg) scale(.8); } -} - -@-webkit-keyframes flipouttoright { - from { -webkit-transform: rotateY(0) scale(1); } - to { -webkit-transform: rotateY(180deg) scale(.8); } -} - - -/* Hackish, but reliable. */ - -@-webkit-keyframes dontmove { - from { opacity: 1; } - to { opacity: 1; } -} - -.pop { - -webkit-transform-origin: 50% 50%; -} - -.pop.in { - -webkit-transform: scale(1); - opacity: 1; - -webkit-animation-name: popin; - z-index: 10; -} - -.pop.in.reverse { - z-index: 0; - -webkit-animation-name: dontmove; -} - -.pop.out.reverse { - -webkit-transform: scale(.2); - opacity: 0; - -webkit-animation-name: popout; - z-index: 10; -} - -@-webkit-keyframes popin { - from { - -webkit-transform: scale(.2); - opacity: 0; - } - to { - -webkit-transform: scale(1); - opacity: 1; - } -} - -@-webkit-keyframes popout { - from { - -webkit-transform: scale(1); - opacity: 1; - } - to { - -webkit-transform: scale(.2); - opacity: 0; - } +.out { + -webkit-animation-timing-function: ease-in; + -webkit-animation-duration: 225ms; + -moz-animation-timing-function: ease-in; + -moz-animation-duration: 225; } \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.fade.css b/css/structure/jquery.mobile.transitions.fade.css new file mode 100644 index 00000000..a22c76a5 --- /dev/null +++ b/css/structure/jquery.mobile.transitions.fade.css @@ -0,0 +1,37 @@ +@-webkit-keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } +} + +@-moz-keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } +} + +@-webkit-keyframes fadeout { + from { opacity: 1; } + to { opacity: 0; } +} + +@-moz-keyframes fadeout { + from { opacity: 1; } + to { opacity: 0; } +} + +.fade.out { + z-index: 0; + opacity: 0; + -webkit-animation-duration: 150ms; + -webkit-animation-name: fadeout; + -moz-animation-duration: 150ms; + -moz-animation-name: fadeout; +} + +.fade.in { + opacity: 1; + z-index: 10; + -webkit-animation-duration: 300ms; + -webkit-animation-name: fadein; + -moz-animation-duration: 300ms; + -moz-animation-name: fadein; +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.flip.css b/css/structure/jquery.mobile.transitions.flip.css new file mode 100644 index 00000000..645be9d5 --- /dev/null +++ b/css/structure/jquery.mobile.transitions.flip.css @@ -0,0 +1,79 @@ +/* The properties in this rule are only necessary for the 'flip' transition. + * We need specify the perspective to create a projection matrix. This will add + * some depth as the element flips. The depth number represents the distance of + * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate + * value. + */ + +.viewport-flip { + -webkit-perspective: 1000; + -moz-perspective: 1000; + position: absolute; +} +.flip { + -webkit-backface-visibility:hidden; + -webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ + -moz-backface-visibility:hidden; + -moz-transform:translateX(0); +} + +.flip.out { + -webkit-transform: rotateY(-90deg) scale(.9); + -webkit-animation-name: flipouttoleft; + -webkit-animation-duration: 225ms; + -moz-transform: rotateY(-90deg) scale(.9); + -moz-animation-name: flipouttoleft; + -moz-animation-duration: 225ms; +} + +.flip.in { + -webkit-animation-name: flipintoright; + -webkit-animation-duration: 350ms; + -moz-animation-name: flipintoright; + -moz-animation-duration: 350ms; +} + +.flip.out.reverse { + -webkit-transform: rotateY(90deg) scale(.9); + -webkit-animation-name: flipouttoright; + -moz-transform: rotateY(90deg) scale(.9); + -moz-animation-name: flipouttoright; +} + +.flip.in.reverse { + -webkit-animation-name: flipintoleft; + -moz-animation-name: flipintoleft; +} + +@-webkit-keyframes flipouttoleft { + from { -webkit-transform: rotateY(0); } + to { -webkit-transform: rotateY(-90deg) scale(.9); } +} +@-moz-keyframes flipouttoleft { + from { -moz-transform: rotateY(0); } + to { -moz-transform: rotateY(-90deg) scale(.9); } +} +@-webkit-keyframes flipouttoright { + from { -webkit-transform: rotateY(0) ; } + to { -webkit-transform: rotateY(90deg) scale(.9); } +} +@-moz-keyframes flipouttoright { + from { -moz-transform: rotateY(0); } + to { -moz-transform: rotateY(90deg) scale(.9); } +} +@-webkit-keyframes flipintoleft { + from { -webkit-transform: rotateY(-90deg) scale(.9); } + to { -webkit-transform: rotateY(0); } +} +@-moz-keyframes flipintoleft { + from { -moz-transform: rotateY(-90deg) scale(.9); } + to { -moz-transform: rotateY(0); } +} +@-webkit-keyframes flipintoright { + from { -webkit-transform: rotateY(90deg) scale(.9); } + to { -webkit-transform: rotateY(0); } +} +@-moz-keyframes flipintoright { + from { -moz-transform: rotateY(90deg) scale(.9); } + to { -moz-transform: rotateY(0); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.flow.css b/css/structure/jquery.mobile.transitions.flow.css new file mode 100644 index 00000000..c30346ed --- /dev/null +++ b/css/structure/jquery.mobile.transitions.flow.css @@ -0,0 +1,88 @@ +/* flow transition */ +.flow { + -webkit-transform-origin: 50% 30%; + -moz-transform-origin: 50% 30%; + -webkit-box-shadow: 0 0 20px rgba(0,0,0,.4); + -moz-box-shadow: 0 0 20px rgba(0,0,0,.4); +} +.ui-dialog-page.flow { + -moz-transform-origin: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} +.flow.out { + -webkit-transform: translateX(-100%) scale(.7); + -webkit-animation-name: flowouttoleft; + -webkit-animation-timing-function: ease; + -webkit-animation-duration: 500ms; + -moz-transform: translateX(-100%) scale(.7); + -moz-animation-name: flowouttoleft; + -moz-animation-timing-function: ease; + -moz-animation-duration: 500ms; +} + +.flow.in { + -webkit-transform: translateX(0) scale(1); + -webkit-animation-name: flowinfromright; + -webkit-animation-timing-function: ease; + -webkit-animation-duration: 400ms; + -moz-transform: translateX(0) scale(1); + -moz-animation-name: flowinfromright; + -moz-animation-timing-function: ease; + -moz-animation-duration: 400ms; +} + +.flow.out.reverse { + -webkit-transform: translateX(100%); + -webkit-animation-name: flowouttoright; + -moz-transform: translateX(100%); + -moz-animation-name: flowouttoright; +} + +.flow.in.reverse { + -webkit-animation-name: flowinfromleft; + -moz-animation-name: flowinfromleft; +} + +@-webkit-keyframes flowouttoleft { + 0% { -webkit-transform: translateX(0) scale(1); } + 60%, 70% { -webkit-transform: translateX(0) scale(.7); } + 100% { -webkit-transform: translateX(-100%) scale(.7); } +} +@-moz-keyframes flowouttoleft { + 0% { -moz-transform: translateX(0) scale(1); } + 60%, 70% { -moz-transform: translateX(0) scale(.7); } + 100% { -moz-transform: translateX(-100%) scale(.7); } +} + +@-webkit-keyframes flowouttoright { + 0% { -webkit-transform: translateX(0) scale(1); } + 60%, 70% { -webkit-transform: translateX(0) scale(.7); } + 100% { -webkit-transform: translateX(100%) scale(.7); } +} +@-moz-keyframes flowouttoright { + 0% { -moz-transform: translateX(0) scale(1); } + 60%, 70% { -moz-transform: translateX(0) scale(.7); } + 100% { -moz-transform: translateX(100%) scale(.7); } +} + +@-webkit-keyframes flowinfromleft { + 0% { -webkit-transform: translateX(-100%) scale(.7); } + 30%, 40% { -webkit-transform: translateX(0) scale(.7); } + 100% { -webkit-transform: translateX(0) scale(1); } +} +@-moz-keyframes flowinfromleft { + 0% { -moz-transform: translateX(-100%) scale(.7); } + 30%, 40% { -moz-transform: translateX(0) scale(.7); } + 100% { -moz-transform: translateX(0) scale(1); } +} +@-webkit-keyframes flowinfromright { + 0% { -webkit-transform: translateX(100%) scale(.7); } + 30%, 40% { -webkit-transform: translateX(0) scale(.7); } + 100% { -webkit-transform: translateX(0) scale(1); } +} +@-moz-keyframes flowinfromright { + 0% { -moz-transform: translateX(100%) scale(.7); } + 30%, 40% { -moz-transform: translateX(0) scale(.7); } + 100% { -moz-transform: translateX(0) scale(1); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.pop.css b/css/structure/jquery.mobile.transitions.pop.css new file mode 100644 index 00000000..15629f17 --- /dev/null +++ b/css/structure/jquery.mobile.transitions.pop.css @@ -0,0 +1,78 @@ +.pop { + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; +} + +.pop.in { + -webkit-transform: scale(1); + -moz-transform: scale(1); + opacity: 1; + -webkit-animation-name: popin; + -moz-animation-name: popin; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; +} + +.pop.out { + -webkit-animation-name: fadeout; + -moz-animation-name: fadeout; + opacity: 0; + -webkit-animation-duration: 225ms; + -moz-animation-duration: 225ms; +} + +.pop.in.reverse { + -webkit-animation-name: fadein; + -moz-animation-name: fadein; +} + +.pop.out.reverse { + -webkit-transform: scale(.8); + -moz-transform: scale(.8); + -webkit-animation-name: popout; + -moz-animation-name: popout; +} + +@-webkit-keyframes popin { + from { + -webkit-transform: scale(.8); + opacity: 0; + } + to { + -webkit-transform: scale(1); + opacity: 1; + } +} + +@-moz-keyframes popin { + from { + -moz-transform: scale(.8); + opacity: 0; + } + to { + -moz-transform: scale(1); + opacity: 1; + } +} + +@-webkit-keyframes popout { + from { + -webkit-transform: scale(1); + opacity: 1; + } + to { + -webkit-transform: scale(.8); + opacity: 0; + } +} + +@-moz-keyframes popout { + from { + -moz-transform: scale(1); + opacity: 1; + } + to { + -moz-transform: scale(.8); + opacity: 0; + } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.slide.css b/css/structure/jquery.mobile.transitions.slide.css new file mode 100644 index 00000000..2d3f8ebb --- /dev/null +++ b/css/structure/jquery.mobile.transitions.slide.css @@ -0,0 +1,50 @@ +/* slide transition */ +.slide.out { + -webkit-transform: translateX(-100%); + -webkit-animation-name: slideouttoleft; + -moz-transform: translateX(-100%); + -moz-animation-name: slideouttoleft; + -webkit-animation-duration: 225ms; + -moz-animation-duration: 225ms; +} + +.slide.in { + -webkit-transform: translateX(0); + -webkit-animation-name: fadein; + -moz-transform: translateX(0); + -moz-animation-name: fadein; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; +} + +.slide.out.reverse { + -webkit-transform: translateX(100%); + -webkit-animation-name: slideouttoright; + -moz-transform: translateX(100%); + -moz-animation-name: slideouttoright; +} + +.slide.in.reverse { + -webkit-transform: translateX(0); + -webkit-animation-name: fadein; + -moz-transform: translateX(0); + -moz-animation-name: fadein; +} + +@-webkit-keyframes slideouttoleft { + from { -webkit-transform: translateX(0); } + to { -webkit-transform: translateX(-100%); } +} +@-moz-keyframes slideouttoleft { + from { -moz-transform: translateX(0); } + to { -moz-transform: translateX(-100%); } +} + +@-webkit-keyframes slideouttoright { + from { -webkit-transform: translateX(0); } + to { -webkit-transform: translateX(100%); } +} +@-moz-keyframes slideouttoright { + from { -moz-transform: translateX(0); } + to { -moz-transform: translateX(100%); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.slidedown.css b/css/structure/jquery.mobile.transitions.slidedown.css new file mode 100644 index 00000000..70c3761a --- /dev/null +++ b/css/structure/jquery.mobile.transitions.slidedown.css @@ -0,0 +1,46 @@ +/* slide down */ +.slidedown.out { + -webkit-animation-name: fadeout; + -moz-animation-name: fadeout; + -webkit-animation-duration: 225ms; + -moz-animation-duration: 225ms; +} + +.slidedown.in { + -webkit-transform: translateY(0); + -webkit-animation-name: slideinfromtop; + -moz-transform: translateY(0); + -moz-animation-name: slideinfromtop; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; +} + +.slidedown.in.reverse { + -webkit-animation-name: fadein; + -moz-animation-name: fadein; +} + +.slidedown.out.reverse { + -webkit-transform: translateY(-100%); + -moz-transform: translateY(-100%); + -webkit-animation-name: slideouttotop; + -moz-animation-name: slideouttotop; +} + +@-webkit-keyframes slideinfromtop { + from { -webkit-transform: translateY(-100%); } + to { -webkit-transform: translateY(0); } +} +@-moz-keyframes slideinfromtop { + from { -moz-transform: translateY(-100%); } + to { -moz-transform: translateY(0); } +} + +@-webkit-keyframes slideouttotop { + from { -webkit-transform: translateY(0); } + to { -webkit-transform: translateY(-100%); } +} +@-moz-keyframes slideouttotop { + from { -moz-transform: translateY(0); } + to { -moz-transform: translateY(-100%); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.slideup.css b/css/structure/jquery.mobile.transitions.slideup.css new file mode 100644 index 00000000..91476c4f --- /dev/null +++ b/css/structure/jquery.mobile.transitions.slideup.css @@ -0,0 +1,46 @@ +/* slide up */ +.slideup.out { + -webkit-animation-name: fadeout; + -moz-animation-name: fadeout; + -webkit-animation-duration: 225ms; + -moz-animation-duration: 225ms; +} + +.slideup.in { + -webkit-transform: translateY(0); + -webkit-animation-name: slideinfrombottom; + -moz-transform: translateY(0); + -moz-animation-name: slideinfrombottom; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; +} + +.slideup.in.reverse { + -webkit-animation-name: fadein; + -moz-animation-name: fadein; +} + +.slideup.out.reverse { + -webkit-transform: translateY(100%); + -moz-transform: translateY(100%); + -webkit-animation-name: slideouttobottom; + -moz-animation-name: slideouttobottom; +} + +@-webkit-keyframes slideinfrombottom { + from { -webkit-transform: translateY(100%); } + to { -webkit-transform: translateY(0); } +} +@-moz-keyframes slideinfrombottom { + from { -moz-transform: translateY(100%); } + to { -moz-transform: translateY(0); } +} + +@-webkit-keyframes slideouttobottom { + from { -webkit-transform: translateY(0); } + to { -webkit-transform: translateY(100%); } +} +@-moz-keyframes slideouttobottom { + from { -moz-transform: translateY(0); } + to { -moz-transform: translateY(100%); } +} \ No newline at end of file diff --git a/css/structure/jquery.mobile.transitions.turn.css b/css/structure/jquery.mobile.transitions.turn.css new file mode 100644 index 00000000..21f5c0ae --- /dev/null +++ b/css/structure/jquery.mobile.transitions.turn.css @@ -0,0 +1,83 @@ +/* The properties in this rule are only necessary for the 'flip' transition. + * We need specify the perspective to create a projection matrix. This will add + * some depth as the element flips. The depth number represents the distance of + * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate + * value. + */ + +.viewport-turn { + -webkit-perspective: 1000; + -moz-perspective: 1000; + position: absolute; +} +.turn { + -webkit-backface-visibility:hidden; + -webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ + -webkit-transform-origin: 0; + + -moz-backface-visibility:hidden; + -moz-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ + -moz-transform-origin: 0; +} + +.turn.out { + -webkit-transform: rotateY(-90deg) scale(.9); + -webkit-animation-name: flipouttoleft; + -moz-transform: rotateY(-90deg) scale(.9); + -moz-animation-name: flipouttoleft; + -webkit-animation-duration: 225ms; + -moz-animation-duration: 225ms; +} + +.turn.in { + -webkit-animation-name: flipintoright; + -moz-animation-name: flipintoright; + -webkit-animation-duration: 350ms; + -moz-animation-duration: 350ms; + +} + +.turn.out.reverse { + -webkit-transform: rotateY(90deg) scale(.9); + -webkit-animation-name: flipouttoright; + -moz-transform: rotateY(90deg) scale(.9); + -moz-animation-name: flipouttoright; +} + +.turn.in.reverse { + -webkit-animation-name: flipintoleft; + -moz-animation-name: flipintoleft; +} + +@-webkit-keyframes flipouttoleft { + from { -webkit-transform: rotateY(0); } + to { -webkit-transform: rotateY(-90deg) scale(.9); } +} +@-moz-keyframes flipouttoleft { + from { -moz-transform: rotateY(0); } + to { -moz-transform: rotateY(-90deg) scale(.9); } +} +@-webkit-keyframes flipouttoright { + from { -webkit-transform: rotateY(0) ; } + to { -webkit-transform: rotateY(90deg) scale(.9); } +} +@-moz-keyframes flipouttoright { + from { -moz-transform: rotateY(0); } + to { -moz-transform: rotateY(90deg) scale(.9); } +} +@-webkit-keyframes flipintoleft { + from { -webkit-transform: rotateY(-90deg) scale(.9); } + to { -webkit-transform: rotateY(0); } +} +@-moz-keyframes flipintoleft { + from { -moz-transform: rotateY(-90deg) scale(.9); } + to { -moz-transform: rotateY(0); } +} +@-webkit-keyframes flipintoright { + from { -webkit-transform: rotateY(90deg) scale(.9); } + to { -webkit-transform: rotateY(0); } +} +@-moz-keyframes flipintoright { + from { -moz-transform: rotateY(90deg) scale(.9); } + to { -moz-transform: rotateY(0); } +} diff --git a/css/themes/default/images/ajax-loader.gif b/css/themes/default/images/ajax-loader.gif new file mode 100644 index 00000000..fd1a189c Binary files /dev/null and b/css/themes/default/images/ajax-loader.gif differ diff --git a/css/themes/default/jquery.mobile.css b/css/themes/default/jquery.mobile.css index f0204d28..58fcd8f9 100644 --- a/css/themes/default/jquery.mobile.css +++ b/css/themes/default/jquery.mobile.css @@ -1,6 +1,14 @@ @import url( "jquery.mobile.theme.css" ); @import url( "../../structure/jquery.mobile.core.css" ); @import url( "../../structure/jquery.mobile.transitions.css" ); +@import url( "../../structure/jquery.mobile.transitions.fade.css" ), +@import url( "../../structure/jquery.mobile.transitions.pop.css" ), +@import url( "../../structure/jquery.mobile.transitions.slide.css" ), +@import url( "../../structure/jquery.mobile.transitions.slidedown.css" ), +@import url( "../../structure/jquery.mobile.transitions.slideup.css" ), +@import url( "../../structure/jquery.mobile.transitions.flip.css" ), +@import url( "../../structure/jquery.mobile.transitions.turn.css" ), +@import url( "../../structure/jquery.mobile.transitions.flow.css" ), @import url( "../../structure/jquery.mobile.grids.css" ); @import url( "../../structure/jquery.mobile.headerfooter.css" ); @import url( "../../structure/jquery.mobile.navbar.css" ); diff --git a/css/themes/default/jquery.mobile.theme.css b/css/themes/default/jquery.mobile.theme.css index 1e5c43e5..f73f5613 100644 --- a/css/themes/default/jquery.mobile.theme.css +++ b/css/themes/default/jquery.mobile.theme.css @@ -44,7 +44,7 @@ color: #2489CE /*{a-bar-link-visited}*/; } .ui-body-a, -.ui-dialog-page.ui-overlay-a { +.ui-overlay-a { border: 1px solid #2A2A2A /*{a-body-border}*/; background: #222222 /*{a-body-background-color}*/; color: #fff /*{a-body-color}*/; @@ -57,6 +57,9 @@ background-image: -o-linear-gradient( #666 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #666 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); } +.ui-overlay-a { + background-image: none; +} .ui-body-a, .ui-body-a input, .ui-body-a select, @@ -184,7 +187,7 @@ color: #ddf0f8 /*{b-bar-link-visited}*/; } .ui-body-b, -.ui-dialog-page.ui-overlay-b { +.ui-overlay-b { border: 1px solid #C6C6C6 /*{b-body-border}*/; background: #cccccc /*{b-body-background-color}*/; color: #333333 /*{b-body-color}*/; @@ -197,6 +200,9 @@ background-image: -o-linear-gradient( #e6e6e6 /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #e6e6e6 /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); } +.ui-overlay-b { + background-image: none; +} .ui-body-b, .ui-body-b input, .ui-body-b select, @@ -326,7 +332,7 @@ font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; } .ui-body-c, -.ui-dialog-page.ui-overlay-c { +.ui-overlay-c { border: 1px solid #B3B3B3 /*{c-body-border}*/; color: #333333 /*{c-body-color}*/; text-shadow: 0 /*{c-body-shadow-x}*/ 1px /*{c-body-shadow-y}*/ 0 /*{c-body-shadow-radius}*/ #fff /*{c-body-shadow-color}*/; @@ -338,6 +344,9 @@ background-image: -o-linear-gradient( #eee /*{c-body-background-start}*/, #ddd /*{c-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #eee /*{c-body-background-start}*/, #ddd /*{c-body-background-end}*/); } +.ui-overlay-c { + background-image: none; +} .ui-body-c, .ui-body-c input, .ui-body-c select, @@ -468,7 +477,7 @@ } .ui-body-d, -.ui-dialog-page.ui-overlay-d { +.ui-overlay-d { border: 1px solid #ccc /*{d-body-border}*/; color: #333333 /*{d-body-color}*/; text-shadow: 0 /*{d-body-shadow-x}*/ 1px /*{d-body-shadow-y}*/ 0 /*{d-body-shadow-radius}*/ #fff /*{d-body-shadow-color}*/; @@ -480,6 +489,9 @@ background-image: -o-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); } +.ui-overlay-d { + background-image: none; +} .ui-body-d, .ui-body-d input, .ui-body-d select, @@ -609,7 +621,7 @@ } .ui-body-e, -.ui-dialog-page.ui-overlay-e { +.ui-overlay-e { border: 1px solid #F7C942 /*{e-body-border}*/; color: #333333 /*{e-body-color}*/; text-shadow: 0 /*{e-body-shadow-x}*/ 1px /*{e-body-shadow-y}*/ 0 /*{e-body-shadow-radius}*/ #fff /*{e-body-shadow-color}*/; @@ -621,6 +633,9 @@ background-image: -o-linear-gradient( #fff /*{e-body-background-start}*/, #faeb9e /*{e-body-background-end}*/); /* Opera 11.10+ */ background-image: linear-gradient( #fff /*{e-body-background-start}*/, #faeb9e /*{e-body-background-end}*/); } +.ui-overlay-e { + background-image: none; +} .ui-body-e, .ui-body-e input, .ui-body-e select, @@ -975,13 +990,8 @@ a.ui-link-inherit { /* loading icon */ .ui-icon-loading { - background-image: url(images/ajax-loader.png); - width: 40px; - height: 40px; - -moz-border-radius: 20px; - -webkit-border-radius: 20px; - border-radius: 20px; - background-size: 35px 35px; + background: url(images/ajax-loader.gif); + background-size: 46px 46px; } diff --git a/css/themes/valencia/jquery.mobile.css b/css/themes/valencia/jquery.mobile.css index f0204d28..58fcd8f9 100644 --- a/css/themes/valencia/jquery.mobile.css +++ b/css/themes/valencia/jquery.mobile.css @@ -1,6 +1,14 @@ @import url( "jquery.mobile.theme.css" ); @import url( "../../structure/jquery.mobile.core.css" ); @import url( "../../structure/jquery.mobile.transitions.css" ); +@import url( "../../structure/jquery.mobile.transitions.fade.css" ), +@import url( "../../structure/jquery.mobile.transitions.pop.css" ), +@import url( "../../structure/jquery.mobile.transitions.slide.css" ), +@import url( "../../structure/jquery.mobile.transitions.slidedown.css" ), +@import url( "../../structure/jquery.mobile.transitions.slideup.css" ), +@import url( "../../structure/jquery.mobile.transitions.flip.css" ), +@import url( "../../structure/jquery.mobile.transitions.turn.css" ), +@import url( "../../structure/jquery.mobile.transitions.flow.css" ), @import url( "../../structure/jquery.mobile.grids.css" ); @import url( "../../structure/jquery.mobile.headerfooter.css" ); @import url( "../../structure/jquery.mobile.navbar.css" ); diff --git a/docs/_assets/js/jqm-docs.js b/docs/_assets/js/jqm-docs.js index 2e360c2a..69fddbd4 100644 --- a/docs/_assets/js/jqm-docs.js +++ b/docs/_assets/js/jqm-docs.js @@ -9,26 +9,6 @@ $(function(){ }); }); -function setDefaultTransition(){ - var winwidth = $( window ).width(), - trans ="slide"; - - if( winwidth >= 1000 ){ - trans = "none"; - } - else if( winwidth >= 650 ){ - trans = "fade"; - } - - $.mobile.defaultPageTransition = trans; -} - - -$(function(){ - setDefaultTransition(); - $( window ).bind( "throttledresize", setDefaultTransition ); -}); - // Turn off AJAX for local file browsing if ( location.protocol.substr(0,4) === 'file' || diff --git a/docs/pages/page-transitions.html b/docs/pages/page-transitions.html index 62462682..87aafc65 100755 --- a/docs/pages/page-transitions.html +++ b/docs/pages/page-transitions.html @@ -23,44 +23,97 @@

Page transitions

-

The jQuery Mobile framework includes a set of six CSS-based transition effects that can be applied to any page link or form submission with Ajax navigation:

+

The jQuery Mobile framework includes a set of CSS-based transition effects that can be applied to any page link or form submission with Ajax navigation:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

fade

dialogpage

pop

dialogpage

flip

dialogpage

turn

dialogpage

flow

dialogpage

slide

dialogpage

slideup

dialogpage

slidedown

dialogpage

none

dialogpage
-
- -
- pop - fade - flip* -
-
- -

Transitions from jQtouch (with small modifications): Built by David Kaneda and maintained by Jonathan Stark.

- -

NOTE: The flip transition isn't rendered correctly on most versions of Android because it lacks 3D CSS transform capabilities. Unfortunately, instead of ignoring the flip, Android makes the page "cartwheel" away by rotating instead of flipping. We recommend using this transition sparingly until support improves.

+

NOTE: To view all transition types, you must be on a browser that supports 3D transforms. By default, devices that lack 3D support will fallback to "fade" for all transition types. This behavior is configurable (see below).

+

Transitions were originally inspired by jQtouch They've since been rebuilt, but props to David Kaneda and Jonathan Stark for the initial guidance.

Setting a transition on a link or form submit

-

By default, the framework applies the right to left slide transition. To set a custom transition effect, add the data-transition attribute to the link.

+

By default, the framework applies a fade transition. To set a custom transition effect, add the data-transition attribute to the link.

<a href="index.html" data-transition="pop">I'll pop</a>

When the Back button is pressed, the framework will automatically apply the reverse version of the transition that was used to show the page. To specify that the reverse version of a transition should be used, add the data-direction="reverse" attribute to a link. Note: (this was formerly data-back="true", which will remain supported until 1.0)

- -

For smoother page transitions, consider enabling the touchOverflow feature.

- +

Global configuration of transitions

Set the defaultPageTransition global option if you'd prefer a different default transition. Dialogs have a different option called defaultDialogTransition that can also set configured.

+ + +

Browser support and performance

+

All transitions are built with CSS keyframe animations and include both -webkit vendor prefixed rules for iOS, Blackberry, Android, Safari and Chrome browsers and -moz rules for Firefox browsers. Support for keyframe animations and transition smoothness is determined by the browser version and hardware and will safely fall back to no transition if animations aren't supported. To proactively exclude transition in situations with poor performance, we exclude browsers that lack 3D transforms and provide a fallback transition and apply a max width for when transitions are applied.

+

Defining fallback transitions for non-3D support

+

By default, all transitions except fade require 3D transform support. Devices that lack 3D support will fall back to a fade transition, regardless of the transition specified. We do this to proactively exclude poorly-performing platforms like Android 2.x from advanced transitions and ensure they still have a smooth experience. Note that there are platforms such as Android 3.0 that technically support 3D transforms, but still have poor animation performance so this won't guarantee that every browser will be 100% flicker-free but we try to target this responsibly.

+ +

The fallback transition for browsers that don't support 3D transforms can be configured for each transition type, but by default we specify "fade" as the fallback. For example, this will set the fallback transition for the slideout transition to "none":

+ $.mobile.fallbackTransition.slideout = "none" + +

Setting a max width for transitions

+

By default, transitions can be disabled (set to "none") when the window width is greater than a certain pixel width. This feature is useful because transitions can be distracting or perform poorly on larger screens. This value is configurable via the global option $.mobile.maxTransitionWidth, which defaults to false. The option accepts any number representing a pixel width or false value. If it's not false, the handler will use a "none" transition when the window width is wider than the specified value.

- +

Creating custom CSS-based transitions

@@ -87,7 +140,7 @@ } -

During a CSS-based page transition, jQuery Mobile will place the class name of the transition on both the "from" and "to" pages involved in the transition. It then places an "out" class on the "from" page, and "in" class on the "to" page. The presence of these classes on the "from" and "to" page elements then triggers the animation CSS rules defined above.

+

During a CSS-based page transition, jQuery Mobile will place the class name of the transition on both the "from" and "to" pages involved in the transition. It then places an "out" class on the "from" page, and "in" class on the "to" page. The presence of these classes on the "from" and "to" page elements then triggers the animation CSS rules defined above. As of jQuery Mobile version 1.1, animation class additions are queued, rather than simultaneous, producing an out-then-in sequence, which is friendlier for mobile rendering than our previous simultaneous transition sequence.

If your transition supports a reverse direction, you need to create CSS rules that use the reverse class in addition to the transition class name and the "in" and "out" classes:

@@ -122,9 +175,18 @@

In case you were wondering why none of the CSS rules above specified any easing or duration, it's because the CSS for jQuery Mobile defines the default easing and duration in the following rules:


-.in, .out {
-    -webkit-animation-timing-function: ease-in-out;
-    -webkit-animation-duration: 350ms;
+.in {
+	-webkit-animation-timing-function: ease-out;
+	-webkit-animation-duration: 350ms;
+	-moz-animation-timing-function: ease-out;
+	-moz-animation-duration: 350ms;
+}
+
+.out {
+	-webkit-animation-timing-function: ease-in;
+	-webkit-animation-duration: 225ms;
+	-moz-animation-timing-function: ease-in;
+	-moz-animation-duration: 225;
 }
 		
@@ -136,15 +198,14 @@

After the new page is loaded, the $.mobile.transitionHandlers dictionary is used to see if any transition handler function is registered for the given transition name. If a handler is found, that handler is invoked to start and manage the transition. If no handler is found the handler specified by the configuration option $.mobile.defaultTransitionHandler is invoked.

-

By default, the $.mobile.transitionHandlers dictionary is only populated with a single handler entry called "none". This handler simply removes the "ui-page-active" class from the page we are transitioning "from", and places it on the page we are transitioning "to". The transition is instantaneous; no animation, no fanfare.

+

By default, the $.mobile.transitionHandlers dictionary is only populated with a single handler entry called "default". This handler plays a dual purpose of either executing a "none" transition, which removes the "ui-page-active" class from the page we are transitioning "from", and places it on the page we are transitioning "to", or a Queued CSS3 Animated Transition, such as the one explained above. If the transition is "none", it will be instantaneous; no animation, no fanfare.

-

The $.defaultTransitionHandler points to a handler function that assumes the name is a CSS class name, and implements the "Pure CSS3 Based Transitions" section above.

+

The $.mobile.defaultTransitionHandler points to a handler function that assumes the name is a CSS class name, and implements the "Pure CSS3 Based Transitions" section above.

-

Both the "none" and "css3" transition handlers are available off of the $.mobile namespace:

+

The default transition handler is available on the $.mobile namespace:


-$.mobile.noneTransitionHandler
-$.mobile.css3TransitionHandler
+$.mobile.transitionHandlers[ "default" ];
 		

Transition Handlers

@@ -247,7 +308,64 @@ $.mobile.defaultTransitionHandler = myTransitionHandler;

Once you do this, your handler will be invoked any time a transition name is used but not found within the $.mobile.transitionHandlers dictionary.

+ +

A model for Custom transition handler development

+

Transition handlers involve a number of critical operations, such as hiding any existing page, showing the new page, scrolling either to the top or a remembered scroll position on that new page, setting focus on the new page, and any animation and timing sequences you'd like to add. During development, we would recommend using jquery.mobile.transitions.js as a coding reference.

+

Transitions and scroll position

+

One of the key things jQuery Mobile does is store your scroll position before starting a transition so it can restore you to the same place once you return to the page when hitting the Back button or closing a dialog. Here are the same buttons from the top to test the scrolling logic.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

fade

dialogpage

pop

dialogpage

flip

dialogpage

turn

dialogpage

flow

dialogpage

slide

dialogpage

slideup

dialogpage

slidedown

dialogpage

none

dialogpage
+ + +
@@ -289,19 +407,70 @@ $.mobile.defaultTransitionHandler = myTransitionHandler; -
+
-

Ta-da!

+

Dialog

-

That was an animated page transition effect that we added with a data-transition attribute on the link.

-

Since it uses CSS transforms, this should be hardware accelerated on many mobile devices.

-

What do you think?

- I like it +

That was an animated page transition effect to a dialog that we added with a data-transition attribute on the link.

+

Since it uses CSS animations, this should be hardware accelerated on many devices. To see transitions, 3D transform support is required so if you only saw a fade transition that's the reason.

+ + Take me back
+ +
+ +
+

Page

+
+ +
+

That was an animated page transition effect to a page that we added with a data-transition attribute on the link. This uses a different background theme swatch to see how that looks with the transitions.

+

Since it uses CSS animations, this should be hardware accelerated on many devices. To see transitions, 3D transform support is required so if you only saw a fade transition that's the reason.

+ +
+ +

Here's a few form elements

+ +

These are here to see if this slows down rendering.

+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ Take me back +
+ +
+
+ + +
+
+
diff --git a/js/index.php b/js/index.php deleted file mode 100644 index 4a4a2e06..00000000 --- a/js/index.php +++ /dev/null @@ -1,46 +0,0 @@ -

" ); + var $loader = $( "

" ); + + // For non-fixed supportin browsers. Position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top + function fakeFixLoader(){ + $loader + .css({ + top: $.support.scrollTop && $window.scrollTop() + $window.height() / 2 || + activeBtn.length && activeBtn.offset().top || 100 + }); + } + + // check position of loader to see if it appears to be "fixed" to center + // if not, use abs positioning + function checkLoaderPosition(){ + if( $loader.offset().top < $window.scrollTop() ){ + $loader.addClass( "ui-loader-fakefix" ); + fakeFixLoader(); + $window + .unbind( "scroll", checkLoaderPosition ) + .bind( "scroll", fakeFixLoader ); + } + } + $.extend($.mobile, { // turn on/off page loading message. showPageLoadingMsg: function() { + $html.addClass( "ui-loading" ); if ( $.mobile.loadingMessage ) { var activeBtn = $( "." + $.mobile.activeBtnClass ).first(); @@ -42,19 +65,21 @@ define( [ "jquery.mobile.core", "jquery.mobile.navigation", "jquery.mobile.navig .find( "h1" ) .text( $.mobile.loadingMessage ) .end() - .appendTo( $.mobile.pageContainer ) - // position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top - .css({ - top: $.support.scrollTop && $window.scrollTop() + $window.height() / 2 || - activeBtn.length && activeBtn.offset().top || 100 - }); + .appendTo( $.mobile.pageContainer ); + + checkLoaderPosition(); + $window.bind( "scroll", checkLoaderPosition ); } - - $html.addClass( "ui-loading" ); }, hidePageLoadingMsg: function() { $html.removeClass( "ui-loading" ); + + if( $.mobile.loadingMessage ){ + $loader.removeClass( "ui-loader-fakefix" ); + } + + $( window ).unbind( "scroll", fakeFixLoader ); }, // find and enhance the pages in the dom and transition to the first page. diff --git a/js/jquery.mobile.js b/js/jquery.mobile.js index abceeb02..c5af9520 100644 --- a/js/jquery.mobile.js +++ b/js/jquery.mobile.js @@ -11,7 +11,14 @@ define([ 'jquery.mobile.core', 'order!jquery.mobile.navigation', 'order!jquery.mobile.navigation.pushstate', - 'order!jquery.mobile.transition', + 'jquery.mobile.transition', + 'jquery.mobile.transition.pop', + 'jquery.mobile.transition.slide', + 'jquery.mobile.transition.slidedown', + 'jquery.mobile.transition.slideup', + 'jquery.mobile.transition.flip', + 'jquery.mobile.transition.flow', + 'jquery.mobile.transition.turn', 'jquery.mobile.degradeInputs', 'jquery.mobile.dialog', 'jquery.mobile.page.sections', diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 24c34331..76f30c8a 100755 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -376,7 +376,7 @@ define( [ //direct focus to the page title, or otherwise first focusable element - function reFocus( page ) { + $.mobile.focusPage = function ( page ) { var pageTitle = page.find( ".ui-title:eq(0)" ); if( pageTitle.length ) { @@ -478,83 +478,29 @@ define( [ // bind to scrollstop for the first page as "pagechange" won't be fired in that case getScrollElem().bind( "scrollstop", delayedSetLastScroll ); - // Make the iOS clock quick-scroll work again if we're using native overflow scrolling - /* - if( $.support.touchOverflow ){ - if( $.mobile.touchOverflowEnabled ){ - $( window ).bind( "scrollstop", function(){ - if( $( this ).scrollTop() === 0 ){ - $.mobile.activePage.scrollTop( 0 ); - } - }); - } - } - */ - //function for transitioning between two existing pages function transitionPages( toPage, fromPage, transition, reverse ) { - //get current scroll distance - var active = $.mobile.urlHistory.getActive(), - touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled, - toScroll = active.lastScroll || ( touchOverflow ? 0 : $.mobile.defaultHomeScroll ), - screenHeight = getScreenHeight(); - - // Scroll to top, hide addr bar - window.scrollTo( 0, $.mobile.defaultHomeScroll ); - if( fromPage ) { //trigger before show/hide events fromPage.data( "page" )._trigger( "beforehide", null, { nextPage: toPage } ); } - if( !touchOverflow){ - toPage.height( screenHeight + toScroll ); - } - toPage.data( "page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } ); - + //clear page loader $.mobile.hidePageLoadingMsg(); - if( touchOverflow && toScroll ){ - - toPage.addClass( "ui-mobile-pre-transition" ); - // Send focus to page as it is now display: block - reFocus( toPage ); - - //set page's scrollTop to remembered distance - if( toPage.is( ".ui-native-fixed" ) ){ - toPage.find( ".ui-content" ).scrollTop( toScroll ); - } - else{ - toPage.scrollTop( toScroll ); - } - } - //find the transition handler for the specified transition. If there //isn't one in our transitionHandlers dictionary, use the default one. //call the handler immediately to kick-off the transition. - var th = $.mobile.transitionHandlers[transition || "none"] || $.mobile.defaultTransitionHandler, + var th = $.mobile.transitionHandlers[ transition || "default" ] || $.mobile.defaultTransitionHandler, promise = th( transition, reverse, toPage, fromPage ); promise.done(function() { - //reset toPage height back - if( !touchOverflow ){ - toPage.height( "" ); - } - - // Jump to top or prev scroll, sometimes on iOS the page has not rendered yet. - if( !touchOverflow ){ - $.mobile.silentScroll( toScroll ); - } //trigger show/hide events if( fromPage ) { - if( !touchOverflow ){ - fromPage.height( "" ); - } - fromPage.data( "page" )._trigger( "hide", null, { nextPage: toPage } ); } @@ -605,7 +551,7 @@ define( [ //animation complete callback $.fn.animationComplete = function( callback ) { if( $.support.cssTransitions ) { - return $( this ).one( 'webkitAnimationEnd', callback ); + return $( this ).one( 'webkitAnimationEnd animationend', callback ); } else{ // defer execution for consistency between webkit/non webkit @@ -625,23 +571,7 @@ define( [ $.mobile.dialogHashKey = dialogHashKey; - //default non-animation transition handler - $.mobile.noneTransitionHandler = function( name, reverse, $toPage, $fromPage ) { - if ( $fromPage ) { - $fromPage.removeClass( $.mobile.activePageClass ); - } - $toPage.addClass( $.mobile.activePageClass ); - - return $.Deferred().resolve( name, reverse, $toPage, $fromPage ).promise(); - }; - - //default handler for unknown transitions - $.mobile.defaultTransitionHandler = $.mobile.noneTransitionHandler; - - //transition handler dictionary for 3rd party transitions - $.mobile.transitionHandlers = { - none: $.mobile.defaultTransitionHandler - }; + //enable cross-domain page support $.mobile.allowCrossDomainPages = false; @@ -1159,7 +1089,7 @@ define( [ settings.reverse = settings.reverse || historyDir < 0; transitionPages( toPage, fromPage, settings.transition, settings.reverse ) - .done(function() { + .done(function( name, reverse, $to, $from, alreadyFocused ) { removeActiveLinkClass(); //if there's a duplicateCachedPage, remove it from the DOM now that it's hidden @@ -1174,7 +1104,9 @@ define( [ // itself to avoid ie bug that reports offsetWidth as > 0 (core check for visibility) // despite visibility: hidden addresses issue #2965 // https://github.com/jquery/jquery-mobile/issues/2965 - reFocus( toPage ); + if( !alreadyFocused ){ + $.mobile.focusPage( toPage ); + } releasePageTransitionLock(); @@ -1299,6 +1231,11 @@ define( [ $activeClickedLink = $( link ).closest( ".ui-btn" ).not( ".ui-disabled" ); $activeClickedLink.addClass( $.mobile.activeBtnClass ); $( "." + $.mobile.activePageClass + " .ui-btn" ).not( link ).blur(); + + // By caching the href value to data and switching the href to a #, we can avoid address bar showing in iOS. The click handler resets the href during its initial steps if this data is present + $( link ) + .jqmData( "href", $( link ).attr( "href" ) ) + .attr( "href", "#" ); } } }); @@ -1322,6 +1259,11 @@ define( [ httpCleanup = function(){ window.setTimeout( function() { removeActiveLinkClass( true ); }, 200 ); }; + + // If there's data cached for the real href value, set the link's href back to it again. This pairs with an address bar workaround from the vclick handler + if( $link.jqmData( "href" ) ){ + $link.attr( "href", $link.jqmData( "href" ) ); + } //if there's a data-rel=back attr, go back in history if( $link.is( ":jqmData(rel='back')" ) ) { @@ -1397,7 +1339,7 @@ define( [ //this may need to be more specific as we use data-rel more role = $link.attr( "data-" + $.mobile.ns + "rel" ) || undefined; - + $.mobile.changePage( href, { transition: transition, reverse: reverse, role: role } ); event.preventDefault(); }); diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js index 681e0c19..9c029f61 100644 --- a/js/jquery.mobile.support.js +++ b/js/jquery.mobile.support.js @@ -27,6 +27,12 @@ function propExists( prop ) { } } +// Thanks to Modernizr src for this test idea +function transform3dTest() { + var prop = "transform-3d"; + return propExists( "perspective" ) || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" ); +} + // Test for dynamic-updating base tag support ( allows us to avoid href,src attr rewriting ) function baseTagTest() { var fauxBase = location.protocol + "//" + location.host + location.pathname + "ui-dir/", @@ -71,11 +77,16 @@ $.mobile.browser.ie = (function() { $.extend( $.support, { orientation: "orientation" in window && "onorientationchange" in window, touch: "ontouchend" in document, - cssTransitions: "WebKitTransitionEvent" in window, + cssTransitions: "WebKitTransitionEvent" in window || (function() { + var div = document.createElement( "div" ); + div.setAttribute('style', '-moz-transition: height 100ms linear'); + return !!div.style.MozTransition; + })(), pushState: "pushState" in history && "replaceState" in history, mediaquery: $.mobile.media( "only all" ), cssPseudoElement: !!propExists( "content" ), touchOverflow: !!propExists( "overflowScrolling" ), + cssTransform3d: transform3dTest(), boxShadow: !!propExists( "boxShadow" ) && !bb, scrollTop: ( "pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[ 0 ] ) && !webos && !operamini, dynamicBaseTag: baseTagTest() diff --git a/js/jquery.mobile.transition.flip.js b/js/jquery.mobile.transition.flip.js new file mode 100644 index 00000000..578e413d --- /dev/null +++ b/js/jquery.mobile.transition.flip.js @@ -0,0 +1,15 @@ +/* +* fallback transition for flip in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +define( [ "jquery.mobile.transition" ], function() { +//>>excludeEnd("jqmBuildExclude"); +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.flip = "fade"; + +})( jQuery, this ); +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +}); +//>>excludeEnd("jqmBuildExclude"); \ No newline at end of file diff --git a/js/jquery.mobile.transition.flow.js b/js/jquery.mobile.transition.flow.js new file mode 100644 index 00000000..815c90e9 --- /dev/null +++ b/js/jquery.mobile.transition.flow.js @@ -0,0 +1,15 @@ +/* +* fallback transition for flow in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +define( [ "jquery.mobile.transition" ], function() { +//>>excludeEnd("jqmBuildExclude"); +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.flow = "fade"; + +})( jQuery, this ); +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +}); +//>>excludeEnd("jqmBuildExclude"); \ No newline at end of file diff --git a/js/jquery.mobile.transition.js b/js/jquery.mobile.transition.js index 906a0dbb..12876cfa 100644 --- a/js/jquery.mobile.transition.js +++ b/js/jquery.mobile.transition.js @@ -3,55 +3,105 @@ */ //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); -//>>description: Page change tranistions. -//>>label: Page Transitions - -// TODO the dependency defined here for transitions is to make sure -// that the defaultTransitionHandler is defined _after_ navigation has been defined -// This requires a rework/rethinking -define( [ "jquery.mobile.core", "order!jquery.mobile.navigation" ], function() { +define( [ "jquery.mobile.core" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, window, undefined ) { -function css3TransitionHandler( name, reverse, $to, $from ) { - +function outInTransitionHandler( name, reverse, $to, $from ) { + + // override name if there's no 3D transform support and a fallback is defined, or if not, to "none" + if( name && !$.support.cssTransform3d && $.mobile.transitionFallbacks[ name ] ){ + name = $.mobile.transitionFallbacks[ name ]; + } + var deferred = new $.Deferred(), reverseClass = reverse ? " reverse" : "", + active = $.mobile.urlHistory.getActive(), + touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled, + toScroll = active.lastScroll || ( touchOverflow ? 0 : $.mobile.defaultHomeScroll ), + screenHeight = $.mobile.getScreenHeight(), viewportClass = "ui-mobile-viewport-transitioning viewport-" + name, - doneFunc = function() { + maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth, + none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none", + doneOut = function() { - $to.add( $from ).removeClass( "out in reverse " + name ); - - if ( $from && $from[ 0 ] !== $to[ 0 ] ) { - $from.removeClass( $.mobile.activePageClass ); + if ( $from ) { + $from + .removeClass( $.mobile.activePageClass + " out in reverse " + name ) + .height( "" ); + } + + $to.addClass( $.mobile.activePageClass ); + + if( !none ){ + $to.animationComplete( doneIn ); } - $to.parent().removeClass( viewportClass ); + // Send focus to page as it is now display: block + $.mobile.focusPage( $to ); + + if( touchOverflow && toScroll ){ - deferred.resolve( name, reverse, $to, $from ); + //set page's scrollTop to remembered distance + if( $to.is( ".ui-native-fixed" ) ){ + $to.find( ".ui-content" ).scrollTop( toScroll ); + } + else{ + $to.scrollTop( toScroll ); + } + } + + // Jump to top or prev scroll, sometimes on iOS the page has not rendered yet. + if( !touchOverflow ){ + $to.height( screenHeight + toScroll ); + + $.mobile.silentScroll( toScroll ); + } + + $to.addClass( name + " in" + reverseClass ); + + if( none ){ + doneIn(); + } + + }, + + doneIn = function() { + $to + .removeClass( "out in reverse " + name ) + .parent().removeClass( viewportClass ) + .height( "" ); + + deferred.resolve( name, reverse, $to, $from, true ); }; - - $to.animationComplete( doneFunc ); - - $to.parent().addClass( viewportClass ); - - if ( $from ) { - $from.addClass( name + " out" + reverseClass ); + + $to + .parent().addClass( viewportClass ); + + if ( $from && !none ) { + $from + .animationComplete( doneOut ) + .height( screenHeight + $(window ).scrollTop() ) + .addClass( name + " out" + reverseClass ); + } + else { + doneOut(); } - $to.addClass( $.mobile.activePageClass + " " + name + " in" + reverseClass ); return deferred.promise(); } -// Make our transition handler public. -$.mobile.css3TransitionHandler = css3TransitionHandler; +// Make our transition handler the public default. +$.mobile.defaultTransitionHandler = outInTransitionHandler; -// If the default transition handler is the 'none' handler, replace it with our handler. -if ( $.mobile.defaultTransitionHandler === $.mobile.noneTransitionHandler ) { - $.mobile.defaultTransitionHandler = css3TransitionHandler; -} +//transition handler dictionary for 3rd party transitions +$.mobile.transitionHandlers = { + "default": $.mobile.defaultTransitionHandler +}; + +$.mobile.transitionFallbacks = {}; })( jQuery, this ); //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); }); -//>>excludeEnd("jqmBuildExclude"); +//>>excludeEnd("jqmBuildExclude"); \ No newline at end of file diff --git a/js/jquery.mobile.transition.pop.js b/js/jquery.mobile.transition.pop.js new file mode 100644 index 00000000..92541a36 --- /dev/null +++ b/js/jquery.mobile.transition.pop.js @@ -0,0 +1,15 @@ +/* +* fallback transition for pop in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +define( [ "jquery.mobile.transition" ], function() { +//>>excludeEnd("jqmBuildExclude"); +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.pop = "fade"; + +})( jQuery, this ); +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +}); +//>>excludeEnd("jqmBuildExclude"); \ No newline at end of file diff --git a/js/jquery.mobile.transition.slide.js b/js/jquery.mobile.transition.slide.js new file mode 100644 index 00000000..84159583 --- /dev/null +++ b/js/jquery.mobile.transition.slide.js @@ -0,0 +1,15 @@ +/* +* fallback transition for slide in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +define( [ "jquery.mobile.transition" ], function() { +//>>excludeEnd("jqmBuildExclude"); +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.slide = "fade"; + +})( jQuery, this ); +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +}); +//>>excludeEnd("jqmBuildExclude"); \ No newline at end of file diff --git a/js/jquery.mobile.transition.slidedown.js b/js/jquery.mobile.transition.slidedown.js new file mode 100644 index 00000000..64cc3980 --- /dev/null +++ b/js/jquery.mobile.transition.slidedown.js @@ -0,0 +1,15 @@ +/* +* fallback transition for slidedown in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +define( [ "jquery.mobile.transition" ], function() { +//>>excludeEnd("jqmBuildExclude"); +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.slidedown = "fade"; + +})( jQuery, this ); +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +}); +//>>excludeEnd("jqmBuildExclude"); \ No newline at end of file diff --git a/js/jquery.mobile.transition.slideup.js b/js/jquery.mobile.transition.slideup.js new file mode 100644 index 00000000..6c844c83 --- /dev/null +++ b/js/jquery.mobile.transition.slideup.js @@ -0,0 +1,15 @@ +/* +* fallback transition for slideup in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +define( [ "jquery.mobile.transition" ], function() { +//>>excludeEnd("jqmBuildExclude"); +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.slideup = "fade"; + +})( jQuery, this ); +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +}); +//>>excludeEnd("jqmBuildExclude"); \ No newline at end of file diff --git a/js/jquery.mobile.transition.turn.js b/js/jquery.mobile.transition.turn.js new file mode 100644 index 00000000..51fc9014 --- /dev/null +++ b/js/jquery.mobile.transition.turn.js @@ -0,0 +1,15 @@ +/* +* fallback transition for turn in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +define( [ "jquery.mobile.transition" ], function() { +//>>excludeEnd("jqmBuildExclude"); +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.turn = "fade"; + +})( jQuery, this ); +//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +}); +//>>excludeEnd("jqmBuildExclude"); \ No newline at end of file diff --git a/tests/unit/navigation/navigation_transitions.js b/tests/unit/navigation/navigation_transitions.js index 5a44806c..e2c304cc 100644 --- a/tests/unit/navigation/navigation_transitions.js +++ b/tests/unit/navigation/navigation_transitions.js @@ -5,6 +5,7 @@ var perspective = "viewport-flip", transitioning = "ui-mobile-viewport-transitioning", animationCompleteFn = $.fn.animationComplete, + defaultMaxTrans = $.mobile.maxTransitionWidth, //TODO centralize class names? transitionTypes = "in out fade slide flip reverse pop", @@ -18,29 +19,32 @@ isTransitioningIn = function(page){ return page.hasClass("in") && isTransitioning(page); }, + + disableMaxTransWidth = function(){ + $.mobile.maxTransitionWidth = false; + }, + + enableMaxTransWidth = function(){ + $.mobile.maxTransitionWidth = defaultMaxTrans; + }, //animationComplete callback queue - callbackQueue = [], + fromQueue = [], + toQueue = [], - finishPageTransition = function(){ - callbackQueue.pop()(); + resetQueues = function(){ + fromQueue = []; + toQueue = []; }, - - clearPageTransitionStack = function(){ - stop(); - var checkTransitionStack = function(){ - if(callbackQueue.length>0) { - setTimeout(function(){ - finishPageTransition(); - checkTransitionStack(); - },0); - } - else { - start(); - } - }; - checkTransitionStack(); + + onFromComplete = function( f ){ + fromQueue.push( f ); }, + + onToComplete = function( f ){ + toQueue.push( f ); + }, + //wipe all urls clearUrlHistory = function(){ @@ -51,101 +55,167 @@ module('jquery.mobile.navigation.js', { setup: function(){ - //stub to prevent class removal - $.fn.animationComplete = function(callback){ - callbackQueue.unshift(callback); + // disable this option so we can test transitions regardless of window width + disableMaxTransWidth(); + + //stub to allow callback before function is returned to transition handler + $.fn.animationComplete = function( callback ){ + animationCompleteFn.call( this, function(){ + var queue = $(this).is(".out") ? fromQueue : toQueue; + for( var i = 0, il = queue.length; i < il; i++ ){ + queue.pop()( this ); + } + callback(); + }); + return this; }; - clearPageTransitionStack(); + resetQueues(); clearUrlHistory(); }, teardown: function(){ // unmock animation complete $.fn.animationComplete = animationCompleteFn; + enableMaxTransWidth(); } }); + + /* + NOTES: + Our default transition handler now has either one or two animationComplete calls - two if there are two pages in play (from and to) + To is required, so each async function must call start() onToComplete, not onFromComplete. + */ + - test( "changePage applys perspective class to mobile viewport for flip", function(){ + asyncTest( "changePage applies perspective class to mobile viewport for flip", function(){ + expect(1); + + onToComplete( function( el ){ + ok($("body").hasClass(perspective), "has perspective class"); + start(); + } ); + $("#foo > a").click(); - ok($("body").hasClass(perspective), "has perspective class"); }); - - test( "changePage does not apply perspective class to mobile viewport for transitions other than flip", function(){ + + asyncTest( "changePage does not apply perspective class to mobile viewport for transitions other than flip", function(){ + expect(1); + + onToComplete( function( el ){ + ok(!$("body").hasClass(perspective), "doesn't have perspective class"); + start(); + } ); + $("#bar > a").click(); - - ok(!$("body").hasClass(perspective), "doesn't have perspective class"); }); - - test( "changePage applys transition class to mobile viewport for default transition", function(){ + + asyncTest( "changePage applies transition class to mobile viewport for default transition", function(){ + expect(1); + + onToComplete( function( el ){ + ok($("body").hasClass(transitioning), "has transitioning class"); + start(); + } ); + $("#baz > a").click(); - ok($("body").hasClass(transitioning), "has transitioning class"); }); - - test( "explicit transition preferred for page navigation reversal (ie back)", function(){ - $("#fade-trans > a").click(); - stop(); - setTimeout(function(){ - finishPageTransition(); + + asyncTest( "explicit transition preferred for page navigation reversal (ie back)", function(){ + expect( 1 ); + + onToComplete(function(){ $("#flip-trans > a").click(); - setTimeout(function(){ - finishPageTransition(); + onToComplete(function(){ $("#fade-trans > a").click(); - setTimeout(function(){ + onToComplete(function(){ ok($("#flip-trans").hasClass("fade"), "has fade class"); start(); - },0); - },0); - },0); + }); + }); + }); + + $("#fade-trans > a").click(); }); - test( "default transition is slide", function(){ - $("#default-trans > a").click(); - stop(); - setTimeout(function(){ - ok($("#no-trans").hasClass("slide"), "has slide class"); + asyncTest( "default transition is fade", function(){ + onToComplete(function(){ + ok($("#no-trans").hasClass("fade"), "has fade class"); start(); - },0); + }) + + $("#default-trans > a").click(); }); - test( "changePage queues requests", function(){ + asyncTest( "changePage queues requests", function(){ + expect(4) var firstPage = $("#foo"), secondPage = $("#bar"); $.mobile.changePage(firstPage); $.mobile.changePage(secondPage); - stop(); - setTimeout(function(){ + onToComplete(function(){ ok(isTransitioningIn(firstPage), "first page begins transition"); ok(!isTransitioningIn(secondPage), "second page doesn't transition yet"); - - finishPageTransition(); - - setTimeout(function(){ + onToComplete(function(){ ok(!isTransitioningIn(firstPage), "first page transition should be complete"); ok(isTransitioningIn(secondPage), "second page should begin transitioning"); start(); - },0); - },0); + + }); + }); }); - test( "default transition is pop for a dialog", function(){ + asyncTest( "default transition is pop for a dialog", function(){ expect( 1 ); - stop(); - setTimeout(function(){ - $("#default-trans-dialog > a").click(); - - ok($("#no-trans-dialog").hasClass("pop"), "expected the pop class to be present but instead was " + $("#no-trans-dialog").attr('class')); - + onToComplete(function(){ + ok($("#no-trans-dialog").hasClass("pop"), "has pop class" ); start(); - }, 900); + }); + + $("#default-trans-dialog > a").click(); }); test( "animationComplete return value", function(){ $.fn.animationComplete = animationCompleteFn; equals($("#foo").animationComplete(function(){})[0], $("#foo")[0]); }); + + + // reusable function for a few tests below + function testTransitionMaxWidth( val, expected ){ + expect( 1 ); + + $.mobile.maxTransitionWidth = val; + + var transitionOccurred = false; + + onToComplete(function(){ + transitionOccurred = true; + }); + + + return setTimeout(function(){ + ok( transitionOccurred === expected, (expected ? "" : "no ") + "transition occurred" ); + start(); + }, 5000); + + $.mobile.changePage( $(".ui-page:not(.ui-page-active)").first() ); + + } + + asyncTest( "maxTransitionWidth property disables transitions when value is less than browser width", function(){ + testTransitionMaxWidth( $( window ).width() - 1, false ); + }); + + asyncTest( "maxTransitionWidth property disables transitions when value is false", function(){ + testTransitionMaxWidth( false, false ); + }); + + + + })(jQuery);