Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

pretty alerts js

//toastr Sweet Alert
//css
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.css" integrity="sha512-3pIirOrwegjM6erE5gPSwkUzO+3cTjpnV9lexlNZqvupR64iZBnOOTiiLPb9M36zpMScbmUNIcHUqKD47M719g==" crossorigin="anonymous" referrerpolicy="no-referrer" />

//must have
var Toast = Swal.mixin({
    toast: true,
    position: 'top-end',
    showConfirmButton: false,
    timer: 3000
});

//how to use toastr:
Toast.fire({
    icon: 'success', // error, info, warning
    title: 'Successfully Created.'
})
//or
toastr.success('Successfully Created.') // error, info, warning

//js
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js" integrity="sha512-VEd+nq25CkR676O+pLBnDW09R7VQX9Mdiij052gVCp5yVH3jGtH70Ho/UUv4mJDsEdTvqRCFZg0NKGiojGnUCw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to export a class in node js 
Javascript :: delete a node in dom javascript 
Javascript :: textalignvertical not working in ios react native 
Javascript :: react bootstrap add progress bar 
Javascript :: javascript button add input to list item 
Javascript :: Bots member count discord js 
Javascript :: jest input value 
Javascript :: add tailwind to vue 
Javascript :: angularjs datetime 
Javascript :: p5js circle 
Javascript :: stop page refresh on button click react 
Javascript :: ajax submit form data 
Javascript :: appending an element to another element javascript 
Javascript :: tolocalestring javascript currency fixing 2 decimal places 
Javascript :: contains() js 
Javascript :: how to use a specific node version for inside a folder 
Javascript :: how to enable click copy function using js 
Javascript :: email regular expression javascript 
Javascript :: antd dropdown stop propogation 
Javascript :: generate an array of random numbers javascript 
Javascript :: import js in jupyter notebook 
Javascript :: how to go to another page onclick in react 
Javascript :: how to find all elements starting with class jquery 
Javascript :: how is javascript compiled 
Javascript :: tsconfig 
Javascript :: how to empty a filled input in cypress 
Javascript :: how to get all the voice channels in discord js 
Javascript :: mongodb mongoose push into nested array 
Javascript :: event module in node js 
Javascript :: promise.race 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =