Biblioteca emergente de notificación elegante-SPOP
| Autor: | silvio-r |
|---|---|
| Views Total: | 884 |
| Sitio oficial: | Ir a la web |
| Actualizado: | January 2, 2018 |
| Licencia: | MIT |
Vista prévia
Descripción
SPOP es una biblioteca de notificación JavaScript pequeña, elegante y personalizable que hace posible crear varios tipos de ventanas emergentes de notificación en la aplicación Web.
Características
- 4 estilos incorporados: por defecto, éxito, ADVERTENCIA, error.
- Auto se descarta después de un tiempo de espera al igual que la tostadora Android.
- 6 posiciones: arriba-izquierda, superior-centro, arriba-derecha, abajo-izquierda, abajo-centro, abajo-derecha.
- Notificaciones agrupadas.
- Abrir y cerrar funciones de devolución de llamada.
- Soporta contenido HTML.
¿Cómo funciona?
Importa los archivos del SPOP en el archivo HTML.
<link href="dist/spop.css" rel="stylesheet"> <script src="dist/spop.js"></script>
Cree los popups de la notificación como éstos:
spop('<strong>Warning pop</strong>');
spop('<strong>Success pop</strong>', 'success');
spop('<strong>Warning pop</strong>', 'warning');
spop('<strong>Error popup</strong>', 'error'); Personalice los popups de notificación con las siguientes opciones.
spop({
// template string
template
: null,
// or success, warning or error
style
: 'info',
// auto close after the timeout
autoclose : false,
// or top-left top-center bottom-left bottom-center bottom-right
position
: 'top-right',
// shows icons
icon
: true,
// string, add a id reference
group
: false,
// callbacks
onOpen
: funtion() { },
onClose
: funtion() { }
});





