弹出框显示2秒后,自动消失

<meta http-equiv="Content-Type" content="textml; charset=utf-8" xmlns="http://www.w3.org/1999/html"/>
<HTML>
<head>
    <meta http-equiv="Content-Type" content="textml; charset=utf-8" />
    <title>jquery点击弹出提示窗口</title>
    <link rel="stylesheet" type="text/css" href="http://sandbox.runjs.cn/uploads/rs/55/sjckzedf/lanrenzhijia.css">
    <script type="text/javascript" src="http://sandbox.runjs.cn/uploads/rs/55/sjckzedf/jquery-1.8.0.min.js"></script>

  

显示2秒后消失的方法

    <script>

        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>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值