夺命雷公狗jquery---30淡出效果

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            div#result{
                width:300px;
                height:300px;
                background-color:red;
            }
        </style>
        <script src="js/jquery.js"></script>
        <script>
            $(function(){
                $('#btnfadeIn').bind('click',function(){
                    $('#result').fadeIn(3000);
                });

                $('#btnfadeOut').bind('click',function(){
                    $('#result').fadeOut(3000,function(){
                        alert('完成任务');
                    });
                });

                $('#btnfadeTo').bind('click',function(){
                    $('#result').fadeTo(3000,0.2);
                });
            })
        </script>
    </head>
    <body>
        <div id="result"></div>
        <hr />
        <input type="button" id="btnfadeIn" value="fadeIn" />
        <input type="button" id="btnfadeOut" value="fadeout" />
        <input type="button" id="btnfadeTo" value="fadeTo" />
    </body>
</html>

 

posted @ 2015-10-27 17:10  夺命雷公狗  阅读(105)  评论(0)    收藏  举报