Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
public_html
/
public
/
app-assets
/
js
/
scripts
/
Filename :
extra-components-sweetalert.min.js
back
Copy
$(function(){"use strict";$(".btn-message").click(function(){swal("Here's a message!")}),$(".btn-title-text").click(function(){swal("Here's a message!","It's pretty, isn't it?")}),$(".btn-timer").click(function(){swal({title:"Auto close alert!",text:"I will close in 2 seconds.",timer:2e3,buttons:!1})}),$(".btn-success-message").on("click",function(){swal({title:"Success",icon:"success"})}),$(".btn-warning-message").on("click",function(){swal({title:"Warning",icon:"warning"})}),$(".btn-error-message").on("click",function(){swal({title:"Error",icon:"error"})}),$(".btn-info-message").on("click",function(){swal({title:"Info",icon:"info"})}),$(".btn-success").click(function(){swal("Good job!","You clicked the button!","success")}),$(".btn-warning-confirm").click(function(){swal({title:"Are you sure?",text:"You will not be able to recover this imaginary file!",icon:"warning",buttons:{cancel:!0,delete:"Yes, Delete It"}})}),$(".btn-warning-cancel").click(function(){swal({title:"Are you sure?",text:"You will not be able to recover this imaginary file!",icon:"warning",dangerMode:!0,buttons:{cancel:"No, Please!",delete:"Yes, Delete It"}}).then(function(e){e?swal("Poof! Your imaginary file has been deleted!",{icon:"success"}):swal("Your imaginary file is safe",{title:"Cancelled",icon:"error"})})}),$(".btn-custom-icon").click(function(){swal({title:"Sweet!",text:"Here's a custom image.",icon:"../../../app-assets/images/favicon/apple-touch-icon-152x152.png"})}),$(".btn-message-html").click(function(){var e=document.createElement("span"),t=document.createTextNode("Custom HTML Message!!");e.style.cssText="color:#F6BB42",e.appendChild(t),swal({title:"HTML Alert!",content:{element:e}})}),$(".btn-input").click(function(){swal("Write something interesting:",{content:"input"}).then(function(e){return!1!==e&&(""===e?(swal("You need to write something!","","error"),!1):void swal("You typed: "+e))})}),$(".btn-theme").click(function(){swal({title:"Themes!",text:"Here's the Twitter theme for SweetAlert!",confirmButtonText:"Cool!",customClass:"twitter"})}),$(".btn-ajax").click(function(){swal({text:'Search for a movie. e.g. "La La Land".',content:"input",button:{text:"Search!",closeModal:!1}}).then(function(e){if(!e)throw null;return fetch("https://itunes.apple.com/search?term="+e+"&entity=movie")}).then(function(e){return e.json()}).then(function(e){var t=e.results[0];if(!t)return swal("No movie was found!");var n=t.trackName,i=t.artworkUrl100;swal({title:"Top result:",text:n,icon:i})}).catch(function(e){e?swal("Oh noes!","The AJAX request failed!","error"):(swal.stopLoading(),swal.close())})})});