Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

sweetalert2 button href

//how to add link to sweet Alert 2
<script>
Swal.fire({
  icon: 'success',
  title: 'Welcome to zombie Line',
  text: 'you Signed up successfully ',
  footer: '<a href="./secondpage.php">Lets Go</a>'
})
</script>
Comment

how to attach function to button sweetalert2

<button onclick="successModal()"id="myButton">Click Here</button>

function successModal() {
    const Toast = Swal.mixin({
      toast: true,
      position: 'top-end',
      showConfirmButton: false,
      timer: 3000,
      timerProgressBar: true,
      didOpen: (toast) => {
        toast.addEventListener('mouseenter', Swal.stopTimer)
        toast.addEventListener('mouseleave', Swal.resumeTimer)
      }
    })

    Toast.fire({
      icon: 'success',
      title: 'Connected Successfully'
    })
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: react if statement 
Javascript :: js return the highest and lowest number 
Javascript :: mongoose update subdocument by id 
Javascript :: js add to array 
Javascript :: how to get data from input field in react js 
Javascript :: javascript list class properties 
Javascript :: puppeteer js headless mode 
Javascript :: react native dynamically update flatlist data 
Javascript :: react cors error 
Javascript :: AngularJS how to use btn-group or radio group in list 
Javascript :: jquery validation stop form submit 
Javascript :: JavaScript throw with try...catch 
Javascript :: [Homepage] is not a <Route component. All component children of <Routes must be a <Route or <React.Fragment 
Javascript :: create multiple images in js 
Javascript :: javascript console 
Javascript :: js sum digits 
Javascript :: dull or blur a background image in react native 
Javascript :: update in mongoose node js 
Javascript :: js object.entries with sort 
Javascript :: how to target checkbox in jquery 
Javascript :: math captcha 
Javascript :: create bottom navigation bar react native 
Javascript :: javascript Create Strings 
Javascript :: set id to div element in Javascript 
Javascript :: findoneandupdate mongoose 
Javascript :: how to create two dimensional array in js 
Javascript :: how to add abutton component to drawer in react native 
Javascript :: mongoose use unified topology 
Javascript :: vue cli debugger 
Javascript :: Custom JavaScript URL Builder 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =