コード:3秒後にモーダルを開く方法は?
<script>
$(document).ready(function()
{
setInterval(function()
{
$('#contact').modal();
}, 3000);
});
</script>
htmlコード:
<a href="#contact"><h4><i class="fa fa-phone"></i>Contact Us</h4></a>
<div id="contact" class="modalDialog">
<div>
<a href="#close" title="Close" class="close">X</a>
<h2>Thanks For Visiting Us</h2>
<form method="post">
<input type="text" name="name" id="name" placeholder="Enter Your Name">
<input type="text" name="email" id="email" placeholder="Enter Your Email">
<input type="text" name="phone" id="phone" placeholder="Enter Your Phone">
<input type="text" name="message" id="message" placeholder="Enter Your Message">
<input name="captcha_code" type="text" value="" placeholder="Enter the code">
<img src="captcha.php" id="capImage"/>
<br/>Can't read the image? click here to <a href="javascript:void(0);" onclick="javascript:$('#capImage').attr('src','captcha.php');">refresh</a>.
<input type="submit" name="insert" id="insert" value="Submit" placeholder="Enter Your Message" >
</form>
</div>
ページは3秒のモーダルが開きます後負荷であるときに私が欲しいです。ここでは、私は3秒後に開いたモーダルに対してsetintervalメソッドを使用しますが、それはできません。ですから、setintervalメソッドを使って3秒後にモーダルを開くにはどうすればいいですか?
は
申し訳ありませんが私の質問に編集私は再びそれを読んで、私に答えてください。 – kevin
は3秒後に開いたポップアップで、何が必要ですか? –