Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Jquery Mobile需要延迟我的对话框_Javascript_Jquery_Android_Jquery Mobile_Mobile Browser - Fatal编程技术网

Javascript Jquery Mobile需要延迟我的对话框

Javascript Jquery Mobile需要延迟我的对话框,javascript,jquery,android,jquery-mobile,mobile-browser,Javascript,Jquery,Android,Jquery Mobile,Mobile Browser,我有我的背景显示在屏幕上几秒钟后,我需要弹出我的对话框 当前的代码是一种飞溅。但我需要几秒钟后弹出,而不是刷新 这是我的密码 <!DOCTYPE html> <html> <head> <title>Apple</title> <!-- the three things that jQuery Mobile needs to work --> <link rel="stylesheet" href="http://

我有我的背景显示在屏幕上几秒钟后,我需要弹出我的对话框

当前的代码是一种飞溅。但我需要几秒钟后弹出,而不是刷新

这是我的密码

<!DOCTYPE html>
<html>
<head>
<title>Apple</title>
<!-- the three things that jQuery Mobile needs to work -->
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
    <style>
        /* App custom styles */

.text-align-center {
 text-align: center;
 }
.text-align-right {
 text-align: right;
}

.ui-content {
 margin-top: 200px;
}

.ui-page {
background : transparent url(http://i45.tinypic.com/abc.jpg) 0 0 no-repeat !important;
background-size : cover;
}
    </style>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
    </script>
    <script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js">
    </script>
   <!-- <script type="text/javascript" src="mobiledetect.js"></script>*/ -->

   <script type="text/javascript">

        $(document).bind("mobileinit", function()
        {
            $.mobile.defaultPageTransition = "fade";
        });
       $('div[data-role|="page"]').live('pageshow', function(event){
              var nextPage = $($(this).attr('NextPage'));
              setTimeout(function(){
            $.mobile.changePage(nextPage);
              }, 1000);
        });
    </script>

</head>
<body>

<div data-role="page" data-theme="b" id="splash" NextPage='#iphonepage' style="background-color: #fff;"> 
    <div class="splash">        
    </div>
</div>

<!-- This is the first page -->
 <section id="iphonepage" data-theme="b" data-role="dialog" style="margin-top: 0.5px !important" style="font-size: 12px !important;">
     <div data-role="content">
            <div>
                <h1 class="text-align-center">
                    <b>
                        Apple
                    </b>
                </h1>
                <br />
            </div>


            <a data-role="button" href="http://m.apple.com">
                Go
            </a>
        </div>

</section>

苹果
/*应用程序自定义样式*/
.文本居中对齐{
文本对齐:居中;
}
.文本右对齐{
文本对齐:右对齐;
}
.ui内容{
利润上限:200px;
}
.ui页面{
背景:透明url(http://i45.tinypic.com/abc.jpg)0 0不要重复!重要;
背景尺寸:封面;
}
$(document).bind(“mobileinit”,function()
{
$.mobile.defaultPageTransition=“淡入淡出”;
});
$('div[data role |='page']).live('pageshow',函数(事件){
var nextPage=$($(this.attr('nextPage'));
setTimeout(函数(){
$.mobile.changePage(下一页);
}, 1000);
});
苹果


您的代码似乎工作正常,有什么问题吗?嗨,贾斯珀。谢谢你的快速回复。在这里,它刷新了整个页面。我只需要对话框在几秒钟后出现。它看起来像是在刷新,但这是因为你给了两个伪页面相同的背景。我更改了它,因此只有
data role=“page”
元素获得背景,这就是您得到的: