Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/434.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Toastr不';使用选项时不要开火_Javascript_User Interface_Notifications_Toastr - Fatal编程技术网

Javascript Toastr不';使用选项时不要开火

Javascript Toastr不';使用选项时不要开火,javascript,user-interface,notifications,toastr,Javascript,User Interface,Notifications,Toastr,我正试着用它 我包括toastr.js、toastr.css和toastr-responsive.css 这项工作: toastr.info("Hello world"); 但这不起作用。我在浏览器控制台中没有发现任何错误: toastr.options.positionClass = "toast-top-full-width"; toastr.info("Hello world"); 原因是什么?制作一把小提琴,让我看看你在做什么 更新: 您不应该链接到github中的原始css和jav

我正试着用它

我包括toastr.js、toastr.css和toastr-responsive.css 这项工作:

toastr.info("Hello world");
但这不起作用。我在浏览器控制台中没有发现任何错误:

toastr.options.positionClass = "toast-top-full-width";
toastr.info("Hello world");

原因是什么?

制作一把小提琴,让我看看你在做什么

更新:

您不应该链接到github中的原始css和javascript。这些不是CDN,因此它们不是为代码服务而设置的。您应该下拉项目的代码,或者在VisualStudio中使用NuGet

例如,如果您将CSS复制到JSFIDLE CSS窗口中(如下所示),这样做很好:

完整地说,这里是我做的一个小的代码更改。。。但这与此无关

$(function () {

    toastr.info("Are you the 6 fingered man?");

    $("#foo1").click(function () {
        alert("test");
    });

    $("#foo2").click(function () {
        toastr.info("Are you the 6 fingered man?");
        console.log("hello");
    });
});

那是我的错。我甚至连小提琴都做不出来。。我错过什么了吗。。