0

Currently I am using jqx notification widget where a click on a button below code executes. 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"
});
Santosh Aryal
  • 1,276
  • 1
  • 18
  • 41
Kap
  • 1

1 Answers1

0

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")

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);
Ravi Makwana
  • 2,782
  • 1
  • 29
  • 41