tengo este codigo que genera una notificacion cuando presiono un boton, lo que deseo es cambiar que cuando carge la pagina el genere la notificacion, me parece que es con onload pero no se como hacerlo, alguien sabe como hacerlo?
Código:
(function() {
var bttn = document.getElementById( 'notification-trigger' );
// make sure..
bttn.disabled = false;
bttn.addEventListener( 'click', function() {
// simulate loading (for demo purposes only)
classie.add( bttn, 'active' );
setTimeout( function() {
classie.remove( bttn, 'active' );
// create the notification
var notification = new NotificationFx({
message : '<p>Soy una Notificacion <a href="#">Ver más</a>.</p>',
layout : 'growl',
effect : 'genie',
type : 'notice', // notice, warning or error
onClose : function() {
bttn.disabled = false;
}
});
// show the notification
notification.show();
}, 1200 );
// disable the button (for demo purposes only)
this.disabled = true;
} );
})();