This code should be run after the jQuery kernel is turned on and before jQuery Mobile is turned on. The reason is that jQuery must be present to run the code, but this event handler must be bound before initializing jQuery Mobile.
For instance:
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script>
$(document).bind("mobileinit", function()
{
if (navigator.userAgent.indexOf("Android") != -1)
{
$.mobile.defaultPageTransition = 'none';
$.mobile.defaultDialogTransition = 'none';
}
});
</script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
: http://jquerymobile.com/demos/1.1.0/docs/api/globalconfig.html
, UA , jQuery Mobile CSS 3D , . jQuery Mobile 1.1.0+, fade, .
3D-
, fade, . , 3D, , . , Android 2.x - . , , Android 3.0, 3D , , 100% , .
, 3D- , "" . , "none":
$.mobile.transitionFallbacks.slideout = "none"
: http://jquerymobile.com/demos/1.1.0/docs/pages/page-transitions.html
, , if/then , , , Android, / .
:
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script>
if (navigator.userAgent.indexOf("Android") != -1)
{
$(document).bind("mobileinit", function()
{
$.mobile.defaultPageTransition = 'none';
$.mobile.defaultDialogTransition = 'none';
});
}
</script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>