code: function openModal() {
      var modal = getModal();
      fadeIn(getOverlay(), 10);
      show(modal);
      addClass(modal, 'showSweetAlert');
      removeClass(modal, 'hideSweetAlert');
  
      previousActiveElement = document.activeElement;
      var $okButton = modal.querySelector('button.confirm');
      $okButton.focus();
  
      setTimeout(function() {
        addClass(modal, 'visible');
      }, 500);
  
      var timer = modal.getAttribute('data-timer');
  
      if (timer !== "null" && timer !== "") {
        modal.timeout = setTimeout(function() {
          closeModal();
        }, timer);
      }
    }
docs: /*
  Animations