AEGON menu Menu

Abraham van Helsing

Welkom Abraham van Helsing.

Uw vorige bezoek was op 00-00-0000 om 00:00 uur

Search form

Aegon Toastr Demo

Simple Toast with text (toggle code)
  Drupal.aegonToast('Hello!!! I am a simple Toast')
Toast with text and heading (toggle code)
Drupal.aegonToast({
  text : 'Hello!!! I am a simple Toast',
  heading: 'Aegon Toast'
})
Toast with top aligned icon (toggle code)
Drupal.aegonToast({
  text : 'Hello!!! I am a simple Toast',
  icon: 'icon-chat',
  heading: 'Aegon Toast'
})
Toast with vertical aligned icon (toggle code)
Drupal.aegonToast({
  text : 'Hello!!! I am a simple Toast',
  heading: 'Aegon Toast',
  icon: {
    class: 'icon-chat',
    verticalAlign : true
  },
  toastWidth: 230
})
Toast with list items (toggle code)
Drupal.aegonToast({
  text : [
    'Lorem ipsum dolor sit amet, quod eius his eu',
    'Falli saperet ea ius, dicant ancillae pro an, eu mentitum iudicabit nec'
  ],
  heading: 'Aegon Toast',
  icon: {
    class: 'icon-chat',
    verticalAlign : true
  }
})
Manually closing Toast (toggle code)
Drupal.aegonToast({
  text : 'Click X icon to close',
  heading: 'Aegon Toast',
  autoHide: false
})
Set position (toggle code)
Drupal.aegonToast({
  text : 'Top right toast',
  heading: 'Aegon Toast',
  position: 'top-right'
})
Toast with close callback (toggle code)
Drupal.aegonToast({
  text : 'Click X icon to close',
  heading: 'Aegon Toast',
  autoHide: false,
  onClose: function () {
    alert('Closing callback');
  }
})
Toast with buttons (toggle code)
Drupal.aegonToast({
  text : 'Falli saperet ea ius, dicant ancillae pro an, eu mentitum iudicabit nec',
  heading: 'Aegon Toast',
  showHideTransition: 'slide',
  autoHide: false,
   buttons: {
      success: {
        text: 'I agree',
        callback: function () {
           alert("click success button");
        }
      },
      closeBtn: {
        text: 'Decline',
        callback: function () {
          alert("clicked close button");
        }
      }
   },
})
Toast with injected html (drupal block) (toggle code)
Drupal.aegonToast({
    bgColor:'#e5f1f9',
    toastWidth: '300px',
    showHideTransition: 'fade',
    autoHide: false,
    textColor: '#3395d3',
    beforeEvent: function(toast) {
      $(".aegon-toast-drupal-custom #proactive-chat-close").on('click', function(e){
        toast.trigger('onClose');
      })
    },
    onClose: function (toast) {
      $.when(toast.remove()).then( alert('Drupal block removed') );
    }
  },
  $("#proactive-chat").clone()
);
Define Stack (default 5) (toggle code)
Drupal.aegonToast({
  text : '3 Stack Toast',
  heading: 'Aegon Toast',
  stack: 3
})
Toast with custom css (toggle code)
Drupal.aegonToast({
  text : 'Lorem ipsum dolor sit amet, at putent eligendi detraxit mel, ei virtute tacimates his, nec agam tation quaestio ea. Cu aliquip epicurei vim, atqui dolorum consetetur eu pri.',
  heading: 'Custom awesome css',
  bgColor: '#48af56',
  stack: 1,
  icon: {
    class: 'icon-whatsapp',
    verticalAlign : true
  },
  toastWidth: 400,
  showHideTransition: 'fade',
  autoHide: false,
  textColor: '#fffff'
  }
);