我正在开始使用 jquery 插件,并且决定尝试一下 Alertify。 我访问了网页: http://fabien-d.github.io/alertify.js/
它告诉我使用 Bower 包管理进行安装。他们甚至为我们提供了代码。 我想知道的是在哪里编写这段代码:
$ bower install alertify
我应该把它写在html文件、css文件还是jquery文件中。
最佳答案
为什么不直接使用该网站上编写的“插入 HTML”方法?
包含 JS
<!-- ideally at the bottom of the page -->
<!-- also works in the <head> -->
<script src="PATH_TO_FILE/alertify.min.js"></script>
包含CSS
<!-- include the core styles -->
<link rel="stylesheet" href="PATH_TO_FILE/alertify.css" />
<!-- include a theme, can be included into the core instead of 2 separate files -->
<link rel="stylesheet" href="PATH_TO_FILE/alertify.default.css" />
如果你想使用 Bower,你应该使用 Node.js。您可以在 github page 中找到有关 Bower 的信息。 .
关于jquery - 在哪里编写 Bower 代码来安装 Alertify?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17946128/