Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « js « assets « exampleSite - github.com/gohugoio/hugo-mod-bootstrap-scss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9eb204c08c539e5e9086cb1b7b1fb5ba3a408cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Import the Bootstrap components we want to use.
// See https://github.com/twbs/bootstrap/blob/main/js/index.umd.js
import Toast from "js/bootstrap/src/toast";
import Popover from "js/bootstrap/src/popover";

(function () {
  let toastElList = [].slice.call(document.querySelectorAll(".toast"));
  let toastList = toastElList.map(function (toastEl) {
    return new Toast(toastEl);
  });

  toastList.forEach(function (toast) {
    toast.show();
  });

  var popoverTriggerList = [].slice.call(
    document.querySelectorAll('[data-bs-toggle="popover"]')
  );
  var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
    return new Popover(popoverTriggerEl);
  });
})();