Page 1 of 1

How do I set $.mobile.defaultPageTransition = 'slide';

Posted: Wed May 22, 2013 9:31 pm
by Harold Gottschalk

Where do I place the following, I know that it is sensitive to its location in the load order of JS in the app.
$(document).bind("mobileinit", function() {
if(/ipad|iphone|ipod/i.test(navigator.userAgent.toLowerCase())){
$.mobile.defaultPageTransition = 'slide';
$.mobile.defaultDialogTransition = 'none';
}
});

currently on IOS i get the white blank page before a transition, I like the android one and know you set that to none, I wanted to do that for IOS or at least force the slide on all my transitions without change the default parameter


How do I set $.mobile.defaultPageTransition = 'slide';

Posted: Thu May 23, 2013 5:51 am
by Maryna Brodina

Hello! Create JS asset with this code you provided.


How do I set $.mobile.defaultPageTransition = 'slide';

Posted: Thu May 23, 2013 6:34 am
by Harold Gottschalk

That does not work. This why I posted the question. In the html code appery generates it places the snip it of code between jquery and jquery mobile. Which is document as the only way to make it work.


How do I set $.mobile.defaultPageTransition = 'slide';

Posted: Thu May 23, 2013 10:35 am
by Maryna Brodina

Please create JS asset with the following code:
code$(function() {
if (navigator.userAgent.match(/iP/i)) {
$.mobile.defaultPageTransition = 'slide';
$.mobile.defaultDialogTransition = 'none';
}
});/code