I am using noty.js plugin (http://ned.im/noty/) to display status info to user. If user click on noty.js message when it is displayed, the message will get hide.
How can I disable click to hide function? I just want the message to stay appear until I auto-hide it or my program command to hide it.
Thank you.
From the docs, here are the default values:
$.noty.defaults = {
layout: 'top',
theme: 'defaultTheme',
type: 'alert',
text: '', // can be html or string
dismissQueue: true, // If you want to use queue feature set this true
template: '<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',
animation: {
open: {height: 'toggle'},
close: {height: 'toggle'},
easing: 'swing',
speed: 500 // opening & closing animation speed
},
timeout: false, // delay for closing event. Set false for sticky notifications
force: false, // adds notification to the beginning of queue when set to true
modal: false,
maxVisible: 5, // you can set max visible notification for dismissQueue true option,
killer: false, // for close all notifications before show
closeWith: ['click'], // ['click', 'button', 'hover']
callback: {
onShow: function() {},
afterShow: function() {},
onClose: function() {},
afterClose: function() {}
},
buttons: false // an array of buttons
};
Notice this property:
closeWith: ['click'], // ['click', 'button', 'hover']
if you call:
noty({
...
closeWith: []
});
Then it won't close when you click on it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With