Beta time
Bootstrap components “Toasts”
Currently relying on Bootstrap and jQuery environments, because it is a function extension of Bootstrap.
Supports arbitrary calls of ten parameters, supports callback functions based on toasts events.
https://zhangchenglin.github.io/bootstrap-toasts/demo.html
npm install bootstrap-toasts --save
<script src="https://cdn.jsdelivr.net/npm/bootstrap-toasts/dist/bootstrap-toasts.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap-toasts/dist/bootstrap-toasts.min.js"></script>
<script src="/bootstrap-toasts.min.js"></script>
bootstrapToasts(title, content, titleColor, delay, position, releaseTime, icon, eventType, eventFunction, ariaType)
Type:String
Default value:undefined
Description:
Type:String
Default value:undefined
Description:
Type:String
Default value:
Description:
parameter |
---|
primary |
secondary |
success |
danger |
warning |
info |
dark |
Type:Number
Default value:10
Unit:second
Description:
min value: 1 max value: any
parameter | similar code |
---|---|
1 | <div class="toast" data-delay="1000"></div> |
2 | <div class="toast" data-delay="2000"></div> |
3 | <div class="toast" data-delay="3000"></div> |
… | ... |
Type:String
Default value:
Description:
parameter |
---|
topLeft |
topCenter |
topRight |
bottomLeft |
bottomCenter |
bottomRight |
center |
Type:String
Default value:
Description:
Type:String
Default value:undefined
Description:
parameter |
---|
success |
danger |
warning |
info |
Type:String
Default value:undefined
Description:
eventType and eventFunction must exist at the same time, otherwise the event function will be invalid.
parameter |
---|
show |
shown |
hide |
hidden |
Type:Function
Default value:undefined
Description:
eventType and eventFunction must exist at the same time, otherwise the event function will be invalid.
Type:String
Default value:alert
Description:
parameter |
---|
alert |
status |