Closed Strandedpirate closed 8 years ago
+1
Edit: My tmp fix
var stylesHtml: {
style1: 'my html 1',
style1: 'my html 2',
style3: 'my html 3',
// ...
// Add this BEFORE calling notify on a jquery element '$elem',
$elem.siblings('.notifyjs-wrapper').find('.notifyjs-container > div:first-child').html(stylesHtml[style]);
Can one of you make a test case for this? An html file that uses the library where we can click on it and see what's supposed to happen.
I updated the OP's fiddle: http://jsfiddle.net/6bexbrwo/9/
And when you look at the source code of Notify.js, you notice here that the HTML container is never updated, only the text & classes.
Notify.js only uses the html from the first style loaded and ignores all others despite being specified in the options.
See the demo below. Two custom styles are added with custom html and the first notification that fires has its html permanently cached and the html from the other style is never loaded for subsequent notifications.
http://jsfiddle.net/StrandedPirate/6bexbrwo/