jquery - notifyjs disappears without hide effect -
i have notification notifyjs jquery plugin.
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 id $.notify({title: $('<div id="'+insertid+'"></div>').append(elem.element)},notifyprops);
the notification appears correctly showanimation of slidedown, when clicked, disappears instead of sliding up, or fading out if fadeout
set hideanimation
.
i'm using addstyle define mystyle
so:
$notify.addstyle("mystyle", { html: "<div>" + "<div class='clearfix'>" + "<div class='lb-close'></div>" + "<div class='notify-title' data-notify-html='title'/>" + "</div>" + "</div>", css: "-webkit-box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.1);-moz-box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.1);box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.1);" });
debugging this, show()
method of notification being called false
parameter, when reaches final line of function:
return elems[fn].apply(elems, args);
the notification div disappears @ once instead of transitioning out. else can check?
it because of these lines, in notification.prototype.show
:
callback = function() { if (!show && !_this.elem) { _this.destroy(); } if (usercallback) { return usercallback(); } };
for reason, _this.elem
undefined, guess in turn destroys notification element. comment check out of callback, , seems ok.
Comments
Post a Comment