diff --git a/dist/toast.min.css b/dist/toast.min.css index f0baad4..18044e7 100644 --- a/dist/toast.min.css +++ b/dist/toast.min.css @@ -3,4 +3,4 @@ * @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component * @version 0.7.1 **/ -#toast-container{position:sticky;z-index:1055;top:0}#toast-wrapper{position:absolute;top:0;right:0;margin:5px}#toast-container>#toast-wrapper>.toast{min-width:150px;background-color:rgb(255,255,255);border-top:none;}#toast-container>#toast-wrapper>.toast>.toast-header strong{padding-right:20px} \ No newline at end of file +.toast-container{position:sticky;z-index:1055;top:0}.toast-wrapper{position:absolute;top:0;right:0;margin:5px}.toast-container > .toast-wrapper > .toast{min-width:150px;background-color:rgb(255, 255, 255);border-top:none}.toast-container > .toast-wrapper > .toast > .toast-header strong{padding-right:20px} diff --git a/dist/toast.min.js b/dist/toast.min.js index 52b1ff3..96838c7 100644 --- a/dist/toast.min.js +++ b/dist/toast.min.js @@ -3,7 +3,7 @@ * @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component * @version 0.7.1 **/ -(function(b){b.toast=function(c){b("#toast-container").length||(b("body").prepend('
'),b("#toast-container").append('
'),b("body").on("hidden.bs.toast",".toast",function(){b(this).remove()}));var h="toast-"+(b(".toast").length+1),a="",e=a="",f="text-muted",g="",q=c.title||"Notice!",r=c.subtitle||"",p=c.content||"",k=c.delay||-1,d=c.img,l=c.pause_on_hover||!1,m=!1,n="";switch(c.type||"info"){case "info":a= -"bg-info";g=f=e="text-white";break;case "success":a="bg-success";g=f=e="text-white";break;case "warning":case "warn":a="bg-warning";g=f=e="text-white";break;case "error":case "danger":a="bg-danger",g=f=e="text-white"}!1!==l?(c=Math.floor(Date.now()/1E3)+k/1E3,n='data-autohide="false"',l='data-hide-timestamp="'+c+'"'):n=-1===k?'data-autohide="false"':'data-delay="'+k+'"';a='";b("#toast-wrapper").append(a);b("#toast-wrapper .toast:last").toast("show");!1!==l&&(setTimeout(function(){m||b("#"+h).toast("hide")},k),b(document).on("mouseover","#"+h,function(){m=!0}),b(document).on("mouseleave","#"+h,function(){var a=Math.floor(Date.now()/1E3),c=parseInt(b(this).data("hide-timestamp"));m=!1;a>=c&&b(this).toast("hide")}))}})(jQuery); \ No newline at end of file + (function(c){c.toast=function(b){var d=c("body");b.container&&1===b.container.length&&(d=b.container);d.children(".toast-container").length||(d.prepend('
'),d.children(".toast-container").append('
'),d.on("hidden.bs.toast",".toast",function(){c(this).remove()}));d=d.children(".toast-container").children(".toast-wrapper");var k="toast-"+(c(".toast").length+1),a="",f=a="",g="text-muted",h="",r=b.title|| + "Notice!",t=b.subtitle||"",q=b.content||"",l=b.delay||-1,e=b.img,m=b.pause_on_hover||!1,n=!1,p="";switch(b.type||"info"){case "info":a="bg-info";h=g=f="text-white";break;case "success":a="bg-success";h=g=f="text-white";break;case "warning":case "warn":a="bg-warning";h=g=f="text-white";break;case "error":case "danger":a="bg-danger",h=g=f="text-white"}!1!==m?(b=Math.floor(Date.now()/1E3)+l/1E3,p='data-autohide="false"',m='data-hide-timestamp="'+b+'"'):p=-1===l?'data-autohide="false"':'data-delay="'+ + l+'"';a='";d.append(a);d.find(".toast:last").toast("show");!1!==m&&(setTimeout(function(){n||c("#"+k).toast("hide")},l),c(document).on("mouseover","#"+k,function(){n=!0}),c(document).on("mouseleave","#"+k,function(){var a=Math.floor(Date.now()/1E3),b=parseInt(c(this).data("hide-timestamp"));n=!1;a>=b&&c(this).toast("hide")}))}})(jQuery);