我只想转到单击我的 noty 对象中的 URL(不是在它关闭时,仅在用户单击通知时)。我试过这个:
var n = noty({
text: 'Nuevo Comentario: <br>' + data.contenido + ' de ' + data.usuario,
layout: 'bottomRight',
type: 'information',
timeout: 3500,
callback: { onClose: function() { /* Go to the URL i want to go */ }},
animation: {
open: {height: 'toggle'}, // jQuery animate function property object
close: {height: 'toggle'}, // jQuery animate function property object
easing: 'swing', // easing
speed: 500 // opening & closing animation speed
}
});
但即使事件自行关闭,也会触发该事件。如何检查用户何时点击通知?