spop.js---A lightweight small pop up widget with no dependencies, create notifications easily with this javascript plugin
This plugin is a lightweight pop up with javascript.
github here
I test all the usual applications here and found out it's very easy to use and looks good if you combine with bootstrp.
Demo😜
Step1:
link spop.css and spop.js
also link bootstrp for more easy and fancy button styles.
also link jquery for click events which is handy.
![]() |
in head |
![]() |
in body |
Step2:
html
![]() |
html |
CSS
a little stylish for test position.
![]() |
css |
js
![]() |
js |
Default
success
warning
error
![]() |
js group |
![]() |
js callback |
When the pop closes, another pop shows success messages and close automatically.
![]() |
js event |
Options :
Templete: the modul of pop messages. could be strings or html
Style:the styles of pop/can be info,success,warning or error
Autoclose:whether close by itself
Position: the position of the pop.can be top-right,top-left,top-center,bottom-left,bottom-center,bottom-right.
Icon:whether show the icon
group:whether group the pop
onOpen: callback function when open the pop
onClose:callback function when close the pop