// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT // IT'S ALL JUST JUNK FOR OUR DOCS! // ++++++++++++++++++++++++++++++++++++++++++ /*! * JavaScript for Bootstrap's docs (https://getbootstrap.com/) * Copyright 2011-2022 The Bootstrap Authors * Copyright 2011-2022 Twitter, Inc. * Licensed under the Creative Commons Attribution 3.0 Unported License. * For details, see https://creativecommons.org/licenses/by/3.0/. */ /* global bootstrap: false */ (() => { 'use strict' // Tooltip and popover demos // Tooltip and popover demos document.querySelectorAll('[data-bs-toggle="tooltip"]') .forEach(tooltip => { new bootstrap.Tooltip(tooltip) }) document.querySelectorAll('[data-bs-toggle="popover"]') .forEach(popover => { new bootstrap.Popover(popover) }) const 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('.bd-example .toast') .forEach(toastNode => { const toast = new bootstrap.Toast(toastNode, { autohide: false }) toast.show() }) const toastTrigger = document.getElementById('liveToastBtn') const toastLiveExample = document.getElementById('liveToast') if (toastTrigger) { toastTrigger.addEventListener('click', () => { const toast = new bootstrap.Toast(toastLiveExample) toast.show() }) } const alertPlaceholder = document.getElementById('liveAlertPlaceholder') const alertTrigger = document.getElementById('liveAlertBtn') const appendAlert = (message, type) => { const wrapper = document.createElement('div') wrapper.innerHTML = [ `