From 4b8af23fb664ce6701d9a887fd9ae87b90130918 Mon Sep 17 00:00:00 2001 From: Marcelo Dolce Date: Fri, 18 Nov 2016 17:04:17 -0200 Subject: [PATCH] upload v1.0.1 --- README.md | 3 ++- css/iziToast.css | 2 +- css/iziToast.min.css | 2 +- js/iziToast.js | 55 ++++++++++++++++++++++++++++++-------------- js/iziToast.min.js | 4 ++-- package.json | 2 +- 6 files changed, 45 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index f5dc868..c59cd78 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ Fast | Responsive | Animated | Lightweight | Customizable | No dependencies | Re ___ ### Version Log -- **v1.0.0** - released +- **v1.0.1** + - ![alt text][new] Internet Explorer support - *Implemented.* ___ ### Install diff --git a/css/iziToast.css b/css/iziToast.css index 36539fc..582c00a 100644 --- a/css/iziToast.css +++ b/css/iziToast.css @@ -1,5 +1,5 @@ /* -* iziToast | v1.0.0 +* iziToast | v1.0.1 * http://izitoast.marcelodolce.com * by Marcelo Dolce. */ diff --git a/css/iziToast.min.css b/css/iziToast.min.css index 358f9c7..2d113b5 100644 --- a/css/iziToast.min.css +++ b/css/iziToast.min.css @@ -1,5 +1,5 @@ /* - * iziToast | v1.0.0 + * iziToast | v1.0.1 * http://izitoast.marcelodolce.com * by Marcelo Dolce. */ diff --git a/js/iziToast.js b/js/iziToast.js index 21a1ed4..d81b88c 100644 --- a/js/iziToast.js +++ b/js/iziToast.js @@ -1,9 +1,8 @@ /* - * iziToast | v1.0.0 + * iziToast | v1.0.1 * http://izitoast.marcelodolce.com * by Marcelo Dolce. */ - (function (root, factory) { if (typeof define === 'function' && define.amd) { define([], factory(root)); @@ -63,6 +62,17 @@ // + /** + * Polyfill for remove() method + */ + if (!('remove' in Element.prototype)) { + Element.prototype.remove = function() { + if (this.parentNode) { + this.parentNode.removeChild(this); + } + }; + } + /** * A simple forEach() implementation for Arrays, Objects and NodeLists * @private @@ -382,14 +392,18 @@ } if (settings.class){ - var event; - if (window.CustomEvent) { - event = new CustomEvent('iziToast-close', {detail: {class: settings.class}}); - } else { - event = document.createEvent('CustomEvent'); - event.initCustomEvent('iziToast-close', true, true, {class: settings.class}); + try { + var event; + if (window.CustomEvent) { + event = new CustomEvent('iziToast-close', {detail: {class: settings.class}}); + } else { + event = document.createEvent('CustomEvent'); + event.initCustomEvent('iziToast-close', true, true, {class: settings.class}); + } + document.dispatchEvent(event); + } catch(ex){ + console.warn(ex); } - document.dispatchEvent(event); } if(typeof settings.onClose !== "undefined") @@ -586,6 +600,8 @@ var position = settings.position, $wrapper; + + if(settings.target){ $wrapper = document.querySelector(settings.target); @@ -610,7 +626,8 @@ if (!$wrapper) { $wrapper = document.createElement("div"); - $wrapper.classList.add(PLUGIN_NAME + '-wrapper', position); + $wrapper.classList.add(PLUGIN_NAME + '-wrapper'); + $wrapper.classList.add(position); document.body.appendChild($wrapper); } if(settings.position == "topLeft" || settings.position == "topCenter" || settings.position == "topRight"){ @@ -622,14 +639,18 @@ settings.onOpen.apply(); - var event; - if (window.CustomEvent) { - event = new CustomEvent('iziToast-open', {detail: {class: settings.class}}); - } else { - event = document.createEvent('CustomEvent'); - event.initCustomEvent('iziToast-open', true, true, {class: settings.class}); + try { + var event; + if (window.CustomEvent) { + event = new CustomEvent('iziToast-open', {detail: {class: settings.class}}); + } else { + event = document.createEvent('CustomEvent'); + event.initCustomEvent('iziToast-open', true, true, {class: settings.class}); + } + document.dispatchEvent(event); + } catch(ex){ + console.warn(ex); } - document.dispatchEvent(event); if(settings.animateInside){ $toast.classList.add(PLUGIN_NAME+'-animateInside'); diff --git a/js/iziToast.min.js b/js/iziToast.min.js index 17c2bb7..7f7499f 100644 --- a/js/iziToast.min.js +++ b/js/iziToast.min.js @@ -1,6 +1,6 @@ /* - * iziToast | v1.0.0 + * iziToast | v1.0.1 * http://izitoast.marcelodolce.com * by Marcelo Dolce. */ -!function(e,t){"function"==typeof define&&define.amd?define([],t(e)):"object"==typeof exports?module.exports=t(e):e.iziToast=t(e)}("undefined"!=typeof global?global:this.window||this.global,function(e){"use strict";function t(){var e,t=document.createElement("fakeelement"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in n)if(void 0!==t.style[e])return n[e]}function n(e){var t=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=e;n.firstChild;)t.appendChild(n.firstChild);return t}function i(e,t,n){var s=!1,a=!1,r=!1,d=null,l=e.querySelector("."+o+"-progressbar div"),c={hideEta:null,maxHideTime:null,currentTime:(new Date).getTime(),updateProgress:function(){if(s=!!e.classList.contains(o+"-paused"),a=!!e.classList.contains(o+"-reseted"),r=!!e.classList.contains(o+"-closed"),a&&(console.log("ok"),clearTimeout(d),l.style.width="100%",i(e,t,n),e.classList.remove(o+"-reseted")),r&&(clearTimeout(d),console.log("closed1"),e.classList.remove(o+"-closed")),!s&&!a&&!r){c.currentTime=c.currentTime+10;var u=(c.hideEta-c.currentTime)/c.maxHideTime*100;l.style.width=u+"%",(Math.round(u)<0||"object"!=typeof e)&&(clearTimeout(d),n.apply(),console.log("closed2"))}}};t.timeout>0&&(c.maxHideTime=parseFloat(t.timeout),c.hideEta=(new Date).getTime()+c.maxHideTime,d=setInterval(c.updateProgress,10))}var o="iziToast",s={},a=!!document.querySelector&&!!e.addEventListener,r=!!/Mobi/.test(navigator.userAgent),d=568,l={},c={"class":"",title:"",message:"",color:"",icon:"",iconText:"",iconColor:"",image:"",imageWidth:50,layout:1,balloon:!1,close:!0,rtl:!1,position:"bottomRight",target:"",timeout:5e3,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",animateInside:!0,buttons:{},transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",onOpen:function(){},onClose:function(){}},u=function(e,t,n){if("[object Object]"===Object.prototype.toString.call(e))for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(n,e[i],i,e);else if(e)for(var o=0,s=e.length;s>o;o++)t.call(n,e[o],o,e)},p=function(e,t){var n={};return u(e,function(t,i){n[i]=e[i]}),u(t,function(e,i){n[i]=t[i]}),n};t();return s.destroy=function(){u(document.querySelectorAll("."+o+"-wrapper"),function(e,t){e.remove()}),u(document.querySelectorAll("."+o),function(e,t){e.remove()}),document.removeEventListener(o+"-open",{},!1),document.removeEventListener(o+"-close",{},!1),l={}},s.settings=function(e){a&&(s.destroy(),l=e,c=p(c,e||{}))},s.info=function(e){var t={color:"blue",icon:"ico-info"},n=p(l,e||{});n=p(t,n||{}),this.show(n)},s.success=function(e){var t={color:"green",icon:"ico-check"},n=p(l,e||{});n=p(t,n||{}),this.show(n)},s.warning=function(e){var t={color:"yellow",icon:"ico-warning"},n=p(l,e||{});n=p(t,n||{}),this.show(n)},s.error=function(e){var t={color:"red",icon:"ico-error"},n=p(l,e||{});n=p(t,n||{}),this.show(n)},s.hide=function(e,t){var n=p(c,e||{});if("object"!=typeof t&&(t=document.querySelector(t)),t.classList.add(o+"-closed"),(n.transitionIn||n.transitionInMobile)&&t.classList.remove(n.transitionIn,n.transitionInMobile),n.transitionOut||n.transitionOutMobile){r||window.innerWidth<=d?n.transitionOutMobile.length>0&&t.classList.add(n.transitionOutMobile):n.transitionOut.length>0&&t.classList.add(n.transitionOut);var i=t.parentNode.offsetHeight;t.parentNode.style.height=i+"px",t.style.pointerEvents="none",r||window.innerWidth<=d||(t.parentNode.style.transitionDelay="0.2s"),setTimeout(function(){t.parentNode.style.height="0px",window.setTimeout(function(){t.parentNode.remove()},1e3)},200)}else t.parentNode.remove();if(n["class"]){var s;window.CustomEvent?s=new CustomEvent("iziToast-close",{detail:{"class":n["class"]}}):(s=document.createEvent("CustomEvent"),s.initCustomEvent("iziToast-close",!0,!0,{"class":n["class"]})),document.dispatchEvent(s)}"undefined"!=typeof n.onClose&&n.onClose.apply()},s.show=function(e){var t=this,s=p(l,e||{});s=p(c,s);var a=document.createElement("div");a.classList.add(o+"-capsule");var m=document.createElement("div");if(m.classList.add(o),r||window.innerWidth<=d?s.transitionInMobile.length>0&&m.classList.add(s.transitionInMobile):s.transitionIn.length>0&&m.classList.add(s.transitionIn),s.rtl&&m.classList.add(o+"-rtl"),s.color.length>0&&("#"==s.color.substring(0,1)||"rgb"==s.color.substring(0,3)||"hsl"==s.color.substring(0,3)?m.style.background=s.color:m.classList.add(o+"-color-"+s.color)),s["class"]&&m.classList.add(s["class"]),s.image){var v=document.createElement("div");v.classList.add(o+"-cover"),v.style.width=s.imageWidth+"px",v.style.backgroundImage="url("+s.image+")",m.appendChild(v)}var h;if(s.close?(h=document.createElement("button"),h.classList.add(o+"-close"),m.appendChild(h)):s.rtl?m.style.paddingLeft="30px":m.style.paddingRight="30px",s.progressBar){var f=document.createElement("div");f.classList.add(o+"-progressbar");var g=document.createElement("div");g.style.background=s.progressBarColor,f.appendChild(g),m.appendChild(f),setTimeout(function(){i(m,s,function(){t.hide(s,m)})},300)}else s.progressBar===!1&&s.timeout>0&&setTimeout(function(){t.hide(s,m)},s.timeout);var y=document.createElement("div");if(y.classList.add(o+"-body"),s.image&&(s.rtl?y.style.marginRight=s.imageWidth+10+"px":y.style.marginLeft=s.imageWidth+10+"px"),s.icon){var w=document.createElement("i");w.setAttribute("class",o+"-icon "+s.icon),s.iconText&&w.appendChild(document.createTextNode(s.iconText)),s.rtl?y.style.paddingRight="33px":y.style.paddingLeft="33px",s.iconColor&&(w.style.color=s.iconColor),y.appendChild(w)}var b=document.createElement("strong");b.appendChild(document.createTextNode(s.title));var L=document.createElement("p");L.appendChild(document.createTextNode(s.message)),s.layout>1&&(L.style.width="100%",m.classList.add(o+"-layout"+s.layout)),s.balloon&&m.classList.add(o+"-balloon"),y.appendChild(b),y.appendChild(L);var C;if(s.buttons.length>0){C=document.createElement("div"),C.classList.add(o+"-buttons"),L.style.marginRight="15px";var E=0;u(s.buttons,function(e,i){C.appendChild(n(e[0]));var o=C.childNodes;o[E].addEventListener("click",function(n){n.preventDefault();var i=e[1];return new i(t,m)}),E++}),y.appendChild(C)}m.appendChild(y),a.style.visibility="hidden",a.style.height="0px",a.appendChild(m),setTimeout(function(){var e=m.offsetHeight,t=m.currentStyle||window.getComputedStyle(m),n=t.marginTop;n=n.split("px"),n=parseInt(n[0]);var i=t.marginBottom;i=i.split("px"),i=parseInt(i[0]),a.style.visibility="",a.style.height=e+i+n+"px",setTimeout(function(){a.style.height="auto"},1e3)},100);var T,x=s.position;s.target?(T=document.querySelector(s.target),T.classList.add(o+"-target"),T.appendChild(a)):(x=r||window.innerWidth<=d?"bottomLeft"==s.position||"bottomRight"==s.position||"bottomCenter"==s.position?o+"-wrapper-bottomCenter":"topLeft"==s.position||"topRight"==s.position||"topCenter"==s.position?o+"-wrapper-topCenter":o+"-wrapper-center":o+"-wrapper-"+x,T=document.querySelector("."+o+"-wrapper."+x),T||(T=document.createElement("div"),T.classList.add(o+"-wrapper",x),document.body.appendChild(T)),"topLeft"==s.position||"topCenter"==s.position||"topRight"==s.position?T.insertBefore(a,T.firstChild):T.appendChild(a)),s.onOpen.apply();var I;if(window.CustomEvent?I=new CustomEvent("iziToast-open",{detail:{"class":s["class"]}}):(I=document.createEvent("CustomEvent"),I.initCustomEvent("iziToast-open",!0,!0,{"class":s["class"]})),document.dispatchEvent(I),s.animateInside){m.classList.add(o+"-animateInside");var O=200,M=100,H=300;if("bounceInLeft"==s.transitionIn&&(O=400,M=200,H=400),window.setTimeout(function(){b.classList.add("slideIn")},O),window.setTimeout(function(){L.classList.add("slideIn")},M),s.icon&&window.setTimeout(function(){w.classList.add("revealIn")},H),s.buttons.length>0&&C){var N=150;u(C.childNodes,function(e,t){window.setTimeout(function(){e.classList.add("revealIn")},N),N+=N})}}h&&h.addEventListener("click",function(e){e.target;t.hide(s,m)}),s.pauseOnHover&&(m.addEventListener("mouseenter",function(e){this.classList.add(o+"-paused")}),m.addEventListener("mouseleave",function(e){this.classList.remove(o+"-paused")})),s.resetOnHover&&(m.addEventListener("mouseenter",function(e){this.classList.add(o+"-reseted")}),m.addEventListener("mouseleave",function(e){this.classList.remove(o+"-reseted")}))},s}); \ No newline at end of file +!function(e,t){"function"==typeof define&&define.amd?define([],t(e)):"object"==typeof exports?module.exports=t(e):e.iziToast=t(e)}("undefined"!=typeof global?global:this.window||this.global,function(e){"use strict";function t(){var e,t=document.createElement("fakeelement"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in n)if(void 0!==t.style[e])return n[e]}function n(e){var t=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=e;n.firstChild;)t.appendChild(n.firstChild);return t}function i(e,t,n){var s=!1,a=!1,r=!1,d=null,l=e.querySelector("."+o+"-progressbar div"),c={hideEta:null,maxHideTime:null,currentTime:(new Date).getTime(),updateProgress:function(){if(s=!!e.classList.contains(o+"-paused"),a=!!e.classList.contains(o+"-reseted"),r=!!e.classList.contains(o+"-closed"),a&&(console.log("ok"),clearTimeout(d),l.style.width="100%",i(e,t,n),e.classList.remove(o+"-reseted")),r&&(clearTimeout(d),console.log("closed1"),e.classList.remove(o+"-closed")),!s&&!a&&!r){c.currentTime=c.currentTime+10;var u=(c.hideEta-c.currentTime)/c.maxHideTime*100;l.style.width=u+"%",(Math.round(u)<0||"object"!=typeof e)&&(clearTimeout(d),n.apply(),console.log("closed2"))}}};t.timeout>0&&(c.maxHideTime=parseFloat(t.timeout),c.hideEta=(new Date).getTime()+c.maxHideTime,d=setInterval(c.updateProgress,10))}var o="iziToast",s={},a=!!document.querySelector&&!!e.addEventListener,r=!!/Mobi/.test(navigator.userAgent),d=568,l={},c={"class":"",title:"",message:"",color:"",icon:"",iconText:"",iconColor:"",image:"",imageWidth:50,layout:1,balloon:!1,close:!0,rtl:!1,position:"bottomRight",target:"",timeout:5e3,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",animateInside:!0,buttons:{},transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",onOpen:function(){},onClose:function(){}};"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var u=function(e,t,n){if("[object Object]"===Object.prototype.toString.call(e))for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(n,e[i],i,e);else if(e)for(var o=0,s=e.length;s>o;o++)t.call(n,e[o],o,e)},p=function(e,t){var n={};return u(e,function(t,i){n[i]=e[i]}),u(t,function(e,i){n[i]=t[i]}),n};t();return s.destroy=function(){u(document.querySelectorAll("."+o+"-wrapper"),function(e,t){e.remove()}),u(document.querySelectorAll("."+o),function(e,t){e.remove()}),document.removeEventListener(o+"-open",{},!1),document.removeEventListener(o+"-close",{},!1),l={}},s.settings=function(e){a&&(s.destroy(),l=e,c=p(c,e||{}))},s.info=function(e){var t={color:"blue",icon:"ico-info"},n=p(l,e||{});n=p(t,n||{}),this.show(n)},s.success=function(e){var t={color:"green",icon:"ico-check"},n=p(l,e||{});n=p(t,n||{}),this.show(n)},s.warning=function(e){var t={color:"yellow",icon:"ico-warning"},n=p(l,e||{});n=p(t,n||{}),this.show(n)},s.error=function(e){var t={color:"red",icon:"ico-error"},n=p(l,e||{});n=p(t,n||{}),this.show(n)},s.hide=function(e,t){var n=p(c,e||{});if("object"!=typeof t&&(t=document.querySelector(t)),t.classList.add(o+"-closed"),(n.transitionIn||n.transitionInMobile)&&t.classList.remove(n.transitionIn,n.transitionInMobile),n.transitionOut||n.transitionOutMobile){r||window.innerWidth<=d?n.transitionOutMobile.length>0&&t.classList.add(n.transitionOutMobile):n.transitionOut.length>0&&t.classList.add(n.transitionOut);var i=t.parentNode.offsetHeight;t.parentNode.style.height=i+"px",t.style.pointerEvents="none",r||window.innerWidth<=d||(t.parentNode.style.transitionDelay="0.2s"),setTimeout(function(){t.parentNode.style.height="0px",window.setTimeout(function(){t.parentNode.remove()},1e3)},200)}else t.parentNode.remove();if(n["class"])try{var s;window.CustomEvent?s=new CustomEvent("iziToast-close",{detail:{"class":n["class"]}}):(s=document.createEvent("CustomEvent"),s.initCustomEvent("iziToast-close",!0,!0,{"class":n["class"]})),document.dispatchEvent(s)}catch(a){console.warn(a)}"undefined"!=typeof n.onClose&&n.onClose.apply()},s.show=function(e){var t=this,s=p(l,e||{});s=p(c,s);var a=document.createElement("div");a.classList.add(o+"-capsule");var m=document.createElement("div");if(m.classList.add(o),r||window.innerWidth<=d?s.transitionInMobile.length>0&&m.classList.add(s.transitionInMobile):s.transitionIn.length>0&&m.classList.add(s.transitionIn),s.rtl&&m.classList.add(o+"-rtl"),s.color.length>0&&("#"==s.color.substring(0,1)||"rgb"==s.color.substring(0,3)||"hsl"==s.color.substring(0,3)?m.style.background=s.color:m.classList.add(o+"-color-"+s.color)),s["class"]&&m.classList.add(s["class"]),s.image){var h=document.createElement("div");h.classList.add(o+"-cover"),h.style.width=s.imageWidth+"px",h.style.backgroundImage="url("+s.image+")",m.appendChild(h)}var v;if(s.close?(v=document.createElement("button"),v.classList.add(o+"-close"),m.appendChild(v)):s.rtl?m.style.paddingLeft="30px":m.style.paddingRight="30px",s.progressBar){var f=document.createElement("div");f.classList.add(o+"-progressbar");var g=document.createElement("div");g.style.background=s.progressBarColor,f.appendChild(g),m.appendChild(f),setTimeout(function(){i(m,s,function(){t.hide(s,m)})},300)}else s.progressBar===!1&&s.timeout>0&&setTimeout(function(){t.hide(s,m)},s.timeout);var y=document.createElement("div");if(y.classList.add(o+"-body"),s.image&&(s.rtl?y.style.marginRight=s.imageWidth+10+"px":y.style.marginLeft=s.imageWidth+10+"px"),s.icon){var w=document.createElement("i");w.setAttribute("class",o+"-icon "+s.icon),s.iconText&&w.appendChild(document.createTextNode(s.iconText)),s.rtl?y.style.paddingRight="33px":y.style.paddingLeft="33px",s.iconColor&&(w.style.color=s.iconColor),y.appendChild(w)}var b=document.createElement("strong");b.appendChild(document.createTextNode(s.title));var L=document.createElement("p");L.appendChild(document.createTextNode(s.message)),s.layout>1&&(L.style.width="100%",m.classList.add(o+"-layout"+s.layout)),s.balloon&&m.classList.add(o+"-balloon"),y.appendChild(b),y.appendChild(L);var C;if(s.buttons.length>0){C=document.createElement("div"),C.classList.add(o+"-buttons"),L.style.marginRight="15px";var E=0;u(s.buttons,function(e,i){C.appendChild(n(e[0]));var o=C.childNodes;o[E].addEventListener("click",function(n){n.preventDefault();var i=e[1];return new i(t,m)}),E++}),y.appendChild(C)}m.appendChild(y),a.style.visibility="hidden",a.style.height="0px",a.appendChild(m),setTimeout(function(){var e=m.offsetHeight,t=m.currentStyle||window.getComputedStyle(m),n=t.marginTop;n=n.split("px"),n=parseInt(n[0]);var i=t.marginBottom;i=i.split("px"),i=parseInt(i[0]),a.style.visibility="",a.style.height=e+i+n+"px",setTimeout(function(){a.style.height="auto"},1e3)},100);var T,x=s.position;s.target?(T=document.querySelector(s.target),T.classList.add(o+"-target"),T.appendChild(a)):(x=r||window.innerWidth<=d?"bottomLeft"==s.position||"bottomRight"==s.position||"bottomCenter"==s.position?o+"-wrapper-bottomCenter":"topLeft"==s.position||"topRight"==s.position||"topCenter"==s.position?o+"-wrapper-topCenter":o+"-wrapper-center":o+"-wrapper-"+x,T=document.querySelector("."+o+"-wrapper."+x),T||(T=document.createElement("div"),T.classList.add(o+"-wrapper"),T.classList.add(x),document.body.appendChild(T)),"topLeft"==s.position||"topCenter"==s.position||"topRight"==s.position?T.insertBefore(a,T.firstChild):T.appendChild(a)),s.onOpen.apply();try{var I;window.CustomEvent?I=new CustomEvent("iziToast-open",{detail:{"class":s["class"]}}):(I=document.createEvent("CustomEvent"),I.initCustomEvent("iziToast-open",!0,!0,{"class":s["class"]})),document.dispatchEvent(I)}catch(O){console.warn(O)}if(s.animateInside){m.classList.add(o+"-animateInside");var M=200,N=100,H=300;if("bounceInLeft"==s.transitionIn&&(M=400,N=200,H=400),window.setTimeout(function(){b.classList.add("slideIn")},M),window.setTimeout(function(){L.classList.add("slideIn")},N),s.icon&&window.setTimeout(function(){w.classList.add("revealIn")},H),s.buttons.length>0&&C){var k=150;u(C.childNodes,function(e,t){window.setTimeout(function(){e.classList.add("revealIn")},k),k+=k})}}v&&v.addEventListener("click",function(e){e.target;t.hide(s,m)}),s.pauseOnHover&&(m.addEventListener("mouseenter",function(e){this.classList.add(o+"-paused")}),m.addEventListener("mouseleave",function(e){this.classList.remove(o+"-paused")})),s.resetOnHover&&(m.addEventListener("mouseenter",function(e){this.classList.add(o+"-reseted")}),m.addEventListener("mouseleave",function(e){this.classList.remove(o+"-reseted")}))},s}); \ No newline at end of file diff --git a/package.json b/package.json index 4a93001..76936d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "izitoast", - "version": "1.0.0b", + "version": "1.0.1", "description": "Elegant, responsive, flexible and lightweight notification plugin with no dependencies.", "readmeFilename": "README.md", "main": "index.js",