我正在使用 Toastr 在 UI 中显示消息弹出窗口。
我通过 Ajax 向服务器发送请求,作为响应,我发送以下响应
echo json_encode(
array(
"type" => "error",
"message" => $error,
"status" => "Error While Updating!"
)
);
我正在使用 resp.type 来显示动态 toastr 所以下面是我的 toastr 代码
.done(function(resp)
{
toastr.resp.type(resp.message, resp.status,{progressBar:!0,showMethod:"slideDown",hideMethod:"slideUp",timeOut:2e3,preventDuplicates: true,positionClass: "toast-bottom-right"});
});
上面代码的问题是,当代码运行时,它会抛出一个错误消息Uncaught TypeError: toastr.type is not a function
任何人都可以帮我解决问题所在或此处可能是正确的解决方案
慕的地10843