Tema: Sweet Alert
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/02/2020, 09:21
juancaalbarracin
 
Fecha de Ingreso: julio-2011
Ubicación: Los Rios
Mensajes: 145
Antigüedad: 12 años, 9 meses
Puntos: 10
Mensaje Sweet Alert

Saludos

Necesito desplegar un sweet alert que me visualice opciones de un html, el problema que al dar click en una de las opciones se me cierre el sweet alert, alguien me da luces?
Código Javascript:
Ver original
  1. function opciones(){
  2. Swal.fire({
  3.   title: 'Elija Opción',
  4.   icon: 'info',
  5.   html:
  6.     '<div><button onclick="haceralgo()">Opcion1</button></div>'+
  7.      '<div><button onclick="haceralgo()">Opcion2</button></div>'+,
  8.   showCancelButton: true,
  9.   cancelButtonText:  'Cancelar',
  10. });
  11. }
  12. function haceralgo(){
  13. //ejecutar comprobaciones
  14. //cerrar sweet alert
  15. }
Código HTML:
Ver original
  1. <button onCLick="opciones()">Dame Click</button>

Agradezco su asistencia
__________________
___________________________
Si te ayudo mi respuesta dale al +1