mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-20 12:21:35 +02:00
Add interactive positioning widget
This commit is contained in:
committed by
XhmikosR
parent
5b0dcf8ffe
commit
6c069b6976
@@ -28,6 +28,17 @@
|
||||
new bootstrap.Popover(popover)
|
||||
})
|
||||
|
||||
var toastPlacement = document.getElementById('toastPlacement')
|
||||
if (toastPlacement) {
|
||||
document.getElementById('selectToastPlacement').addEventListener('change', function () {
|
||||
if (!toastPlacement.dataset.originalClass) {
|
||||
toastPlacement.dataset.originalClass = toastPlacement.className
|
||||
}
|
||||
|
||||
toastPlacement.className = toastPlacement.dataset.originalClass + ' ' + this.value
|
||||
})
|
||||
}
|
||||
|
||||
document.querySelectorAll('.toast')
|
||||
.forEach(function (toastNode) {
|
||||
var toast = new bootstrap.Toast(toastNode, {
|
||||
|
Reference in New Issue
Block a user