我正在尝试执行Toastr。现在改变Toastr位置?
我能得到警报和祝酒词如预期,但我不能应用其他选项。 它只是遵循默认选项。
我想是这样的:
var options = {
"closeButton": true,
"debug": false,
"newestOnTop": false,
"progressBar": true,
"positionClass": "toast-bottom-center",
"preventDuplicates": false,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
}
$.simplyToast('This is a success message!', 'success',options);
console.log(options);
console.log($.simplyToast);
现在它不具备行为如预期,我已经设置positionClass到BottomCenter但我总是默认显示右上角。
我怎样才能改变像其demo page提到的选项。
什么是'$ .simplyToast'? AFAIK,这些选项是'toastr',而不是'simplyToast'。 – 31piy
我从Github下载了代码,它帮助注意到演示页面是这样的,所以我使用的代码,可以帮助我与toastr – Rajan
SimplyToast和Toastr是两个单独的插件。有关toastr的更多详细信息,请参阅[本站点](https://github.com/CodeSeven/toastr)。 – 31piy