sweet alert add custom button
$(document).on('click', '.SwalBtn1', function() {
//Some code 1
console.log('Button 1');
swal.clickConfirm();
});
$(document).on('click', '.SwalBtn2', function() {
//Some code 2
console.log('Button 2');
swal.clickConfirm();
});
$('#ShowBtn').click(function(){
swal({
title: 'Title',
html: "Some Text" +
"<br>" +
'<button type="button" role="button" tabindex="0" class="SwalBtn1 customSwalBtn">' + 'Button1' + '</button>' +
'<button type="button" role="button" tabindex="0" class="SwalBtn2 customSwalBtn">' + 'Button2' + '</button>',
showCancelButton: false,
showConfirmButton: false
});
});
Also in JavaScript:
- react js text input with icon
- jquert toggleClass condition
- remove disabled attribute javascript
- HashLocationStrategy
- How to check if a member has a role discord.js
- react chrome extension
- selector id jquery but is variable
- react create pillbox for each chunk of array
- loop through json array and get key name
- react native android padding style
- filter in js
- javascript recursive fibonacci
- javascript hide div
- how to move an ellipse along the x axis in javascript
- jquery $.post
- vscode display zsh characters
- set value of attribute using each and keyup jquery
- jquery abort ajax
- remove duplicate id in list react jsx
- javascript whitespace strip
- Javascript convert html entity to string
- loop over keys in object javascript
- ./src/index.js Line 0: Parsing error: Cannot find module '@babel/helper-validator-identifier'
- set a variable in express.js