MediaWiki: Tweeki.js: Perbedaan antara revisi
Dari GBI Danau Bogor Raya
kTidak ada ringkasan suntingan |
kTidak ada ringkasan suntingan |
||
| Baris 24: | Baris 24: | ||
Array.prototype.forEach.call(children, function (child) { | Array.prototype.forEach.call(children, function (child) { | ||
one.appendChild(child); | one.appendChild(child); | ||
}); | |||
// Bootstrap 5 | |||
var alertList = document.querySelectorAll('.alert') | |||
alertList.forEach(function (alert) { | |||
new bootstrap.Alert(alert) | |||
}); | }); | ||
Revisi per 25 Juli 2024 18.08
/* Any JavaScript here will be loaded for users using the Tweeki skin */
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tableOffset = $("#table-1").offset().top;
var $header = $("#table-1 > thead").clone();
var $fixedHeader = $("#header-fixed").append($header);
$(window).bind("scroll", function() {
var offset = $(this).scrollTop();
if (offset >= tableOffset && $fixedHeader.is(":hidden")) {
$fixedHeader.show();
} else if (offset < tableOffset) {
$fixedHeader.hide();
}
});
var one = document.querySelector("#sidebar-right");
var children = document.querySelector(".catlinks").children;
Array.prototype.forEach.call(children, function (child) {
one.appendChild(child);
});
// Bootstrap 5
var alertList = document.querySelectorAll('.alert')
alertList.forEach(function (alert) {
new bootstrap.Alert(alert)
});