jquery 为什么Typed.js不适用于我的案例?

soat7uwm  于 2023-03-01  发布在  jQuery
关注(0)|答案(2)|浏览(105)

我的问题是typed.js不起作用。
代码:

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
<script src="js/jquery-1.11.3.min.js"></script>

<!-- Include all compiled plugins (below), or include individual files as needed --> 
<script src="js/bootstrap.js"></script>
<script src="js/typed.js"></script>
<script src="js/particles.js"></script>
<script src="js/app.js"></script>
    <script>
    var options = {
    strings: ["HI im am cool", "HI im not cool"],
    typeSpeed: 40

    }

    var typed = new Typed(".typing", options);
    });

    </script>
pcww981p

pcww981p1#

  • (代表问题作者张贴以将其移动到答案空间)*。

对于那些没有发现问题的人来说,这是一个语法错误,因为注解旁边有括号。

var typed = new Typed(".typing", options);
}); <!-- problem is here -->
qaxu7uf2

qaxu7uf22#

我只是想给你一个想法如何开始:
结构:

<html>

  <head>
    <title>title</title>
    /* add you styles or scripts here... */ /* to add style.css */
    <link rel="stylesheet" href="./style.css" />
  </head>

  <body>
    HTML Content 
    /* include your scripts according to priority */

  <script>
      /* custom script goes here */ 
  < script >

  </body> 
   </html>

相关问题