Open robertnicjoo opened 5 years ago
there is a method like this in /js/actions.js
/ MESSAGE BOX /
$(".mb-control").on("click", function () {
var box = $($(this).data("box"));
if (box.length > 0) {
box.toggleClass("open");
var sound = box.data("sound");
if (sound === 'alert')
playAudio('alert');
if (sound === 'fail')
playAudio('fail');
}
return false;
});
that method just works on ready , you could paste the function inside and call it where do you want. thats all then it will work. you have to put data-box="#message-box-danger" as an attribute to some label or item that you want and this class mb-control .
hi, I'm using this template in dynamic application and message boxes wont open when i have errors, as the sample page works with id and buttons to open message boxes should i edit some file or codes in order to let them open without any click function? just like bootstrap alerts??
thanks.