<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.2.1.js"></script>
    <style>
        #div1{
            height: 400px;
            width: 600px
            background-color: #7b7b7b;
            opacity: 1;
        }
    </style>
</head>
<body>
    <div id="div1"></div>
    <script>
        (function ($) {
            $.fn.extend({
                hello:function () {

                     setTimeout("$(\"#div1\").css(\"background-color\",\"red\");",2000);

                     setTimeout("$(\"#div1\").css(\"background-color\",\"black\");",4000);

                     setTimeout("$(\"#div1\").css(\"background-color\",\"gold\");",6000);
                }
            })
        })(jQuery);

        $("#div1").hello()
    </script>
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2021-12-10
  • 2022-01-12
  • 2021-09-12
  • 2022-12-23
  • 2021-11-05
  • 2021-08-30
  • 2021-11-08
猜你喜欢
  • 2021-12-13
  • 2021-11-05
  • 2021-12-11
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
相关资源
相似解决方案