Ois*_*ley 5 model-view-controller jquery toastr
我尝试了下面的代码,但是当我在浏览器中启动页面时,没有任何东西弹出
<script>
$(function () { //ready
toastr.info('For more information, see our FAQ guide located below.');
});
</script>
Run Code Online (Sandbox Code Playgroud)
ale*_*lex 14
如果您在页面中包含了jQuery,toastr.js 和 toastr.css,那么这应该可行.我一定要检查一下这些脚本的路径是否正确,我会检查控制台是否有任何错误.
<script src="/example-path-to/jquery-2.1.4.js"></script>
<script src="/example-path-to/toastr.js"></script>
<link href="/example-path-to/toastr.css" rel="stylesheet" />
<script>
$(function () { //ready
toastr.info('If all three of these are referenced correctly, then this should toast should pop-up.');
});
</script>
Run Code Online (Sandbox Code Playgroud)