SweetAlerts in JavaScript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

SweetAlerts in JavaScript

How do you make a SweetAlert Have multiple buttons??

4th Oct 2018, 9:26 AM
Little Cupcake
Little Cupcake - avatar
1 Answer
+ 7
According to their doc you need to use an object for multiple buttons. check their demo code and documentation for info. If still stuck, ask away. https://sweetalert.js.org/guides/ #see demo code below https://code.sololearn.com/WOCCgGevzhlZ/?ref=app #Comments about their documentation: Their documentation and even error messages are very good. I tried doing multiple buttons by modifying a single swal() demo the error message let me know to use an object for multiple buttons.
4th Oct 2018, 12:17 PM
Lord Krishna
Lord Krishna - avatar