简体   繁体   English

烤面包机-选项问题

[英]Toastr - issue with the options

I called a toastr message via 我通过拨打了敬酒信息

 Command: toastr["success"]("foo") toastr.options = { "closeButton": false, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-bottom-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "2000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <link href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet"/> <script src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script> 

It seems the options have no effect, the timeOut and the positionClass were not overridden. 看来这些选项没有作用, timeOutpositionClass没有被覆盖。

May somebody give me a info whats wrong? 可以给我一个信息怎么了吗?

我认为您应该在首次调用烤面包机的方法(信息,成功等)之前更改选项。

you should change your jquery version if 1.2.3 is the version you use, i built a jsbin and tested it. 如果1.2.3是您使用的版本,则应该更改您的jquery版本,我构建了一个jsbin并对其进行了测试。 Just try it with a newer version for eg "1.9.1". 只需尝试使用更高版本的“ 1.9.1”即可。 if you need to stick to 1.2.3 try another version of toastr compatible with jquery 1.2.3. 如果您需要坚持使用1.2.3,请尝试与jquery 1.2.3兼容的另一版本的toastr。

here is the jsbin: https://jsbin.com/rufuganane/edit?html,output 这是jsbin: https ://jsbin.com/rufuganane/edit ? html,输出

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM