[英]JQX Notification Widget showing multiple messages
Currently I am using jqx notification widget where a click on a button below code executes.目前我正在使用 jqx 通知小部件,其中单击代码下方的按钮执行。 But the problem is it displays multiple messages when we click on a button.但问题是当我们点击一个按钮时它会显示多条消息。 I want to restrict it to single notification when we click on that button.当我们单击该按钮时,我想将其限制为单个通知。 Once it fades and the user clicks on that button it should display that message.一旦它消失并且用户单击该按钮,它就会显示该消息。
$('#dialog').after("<div id = 'jqxNotification' style='display: none;'>Saved Successfully.</div>");
$("#jqxNotification").jqxNotification({ width: 250, position: "top-right", opacity: 0.9,
autoOpen: true, animationOpenDelay: 800, autoClose: true, template: "success"
});
Here's some tips这里有一些提示
There's no any setting for to do this, but what you can do is没有任何设置可以执行此操作,但是您可以做的是
before open showing notification hide all previous all notification by property .jqxNotification("closeAll")
在打开显示通知之前通过属性.jqxNotification("closeAll")
隐藏所有以前的所有通知
function showMessage() {
$("#jqxNotification").jqxNotification("closeAll");
$('#dialog').after("<div id = 'jqxNotification' style='display: none;'>Saved Successfully.</div>");
$("#jqxNotification").jqxNotification({ width: 250, position: "top-right", opacity: 0.9,
autoOpen: true, animationOpenDelay: 800, autoClose: true, template: "success"
});
}
showMessage()
setTimeout(showMessage,1000);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.