彈出框顯示2秒後,自動消失
阿新 • • 發佈:2019-01-05
jQuery(document).ready(function($) {
$('.theme-login').click(function(){
$('.theme-popover-mask').fadeIn(100);
$('.theme-popover').slideDown(200);
setTimeout(function() {
console.log('22222222222');
$('.theme-popover-mask').fadeOut(100);
$('.theme-popover').slideUp(200);
}, 1000);
})
$('.theme-poptit .close').click(function(){
$('.theme-popover-mask').fadeOut(100);
$('.theme-popover').slideUp(200);
})
})
</script>
</head>
<body >
<from>
<div style="margin-top: 50px; margin-left: 605px;">
<h3>請輸入文字:企業灣</h3></br>
<input type="text" style="width: 160px;height: 30px">
</div>
<div class="theme-buy">
<a class="btn btn-primary btn-large theme-login" href="javascript:;">一鍵分享朋友圈</a>
</div>
<div class="theme-popover">
<div class="theme-poptit">
<a href="javascript:;" title="關閉" class="close">×</a>
</div>
<div class="theme-popbod dform">
<form class="theme-signin" name="loginform" action="" method="post">
<ol>
<li><h2>任務完成,你真棒!</h2></li>
</ol>
</form>
</div>
</div>
</form>
</body>
</HTML>
$('.theme-login').click(function(){
$('.theme-popover-mask').fadeIn(100);
$('.theme-popover').slideDown(200);
setTimeout(function() {
console.log('22222222222');
$('.theme-popover-mask').fadeOut(100);
$('.theme-popover').slideUp(200);
}, 1000);
})
$('.theme-poptit .close').click(function(){
$('.theme-popover-mask').fadeOut(100);
$('.theme-popover').slideUp(200);
})
})
</script>
</head>
<body >
<from>
<div style="margin-top: 50px; margin-left: 605px;">
<h3>請輸入文字:企業灣</h3></br>
<input type="text" style="width: 160px;height: 30px">
</div>
<div class="theme-buy">
<a class="btn btn-primary btn-large theme-login" href="javascript:;">一鍵分享朋友圈</a>
</div>
<div class="theme-popover">
<div class="theme-poptit">
<a href="javascript:;" title="關閉" class="close">×</a>
</div>
<div class="theme-popbod dform">
<form class="theme-signin" name="loginform" action="" method="post">
<ol>
<li><h2>任務完成,你真棒!</h2></li>
</ol>
</form>
</div>
</div>
</form>
</body>
</HTML>