2015-01-14 87 views
4

我试着下面的代码,但什么也没有弹出,当我启动页面在浏览器中Toastr通知不工作

<script> 
      $(function() { //ready 
       toastr.info('For more information, see our FAQ guide located below.'); 
      }); 



</script> 
+0

请提供从Chrome开发人员工具 – AuthorProxy

回答

9

如果你已经包括了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> 
+2

完整的HTML网页代码或小提琴手演示或至少错误我得到这个工作了一段时间回来,感谢您抽出时间来回答。 – OisinFoley