Jquery notifyjs将消失而不显示隐藏效果
我有一个关于notifyjs jQuery插件的通知Jquery notifyjs将消失而不显示隐藏效果,jquery,notifyjs,Jquery,Notifyjs,我有一个关于notifyjs jQuery插件的通知 var notifyProps = {}; notifyProps.showAnimation = 'slideDown'; notifyProps.showDuration = 2500; notifyProps.hideAnimation = 'slideUp'; notifyProps.hideDuration = 2500; notifyProps.style = 'myStyle'; notifyProps.clickToHide
var notifyProps = {};
notifyProps.showAnimation = 'slideDown';
notifyProps.showDuration = 2500;
notifyProps.hideAnimation = 'slideUp';
notifyProps.hideDuration = 2500;
notifyProps.style = 'myStyle';
notifyProps.clickToHide = true;
var insertId = ("myId"+ Math.random()).replace('0\.',''); //just an id
$.notify({title: $('<div id="'+insertId+'"></div>').append(elem.element)},notifyProps);
通过调试,将调用通知的show()
方法,并将false
作为参数,但当它到达此函数的最后一行时:
return elems[fn].apply(elems, args);
通知div立即消失,而不是转换出去。我还可以检查什么?这是因为
Notification.prototype.show中的这些行:
callback = function() {
if (!show && !_this.elem) {
_this.destroy();
}
if (userCallback) {
return userCallback();
}
};
出于某种原因,\u this.elem
总是未定义的,我想这反过来会破坏通知元素。我只是评论了一下,签出回调,一切似乎都很好
callback = function() {
if (!show && !_this.elem) {
_this.destroy();
}
if (userCallback) {
return userCallback();
}
};