Init all select2

This commit is contained in:
Corban-Lee Jones 2024-04-26 23:27:54 +01:00
parent 990229f3b2
commit 001f586ceb

View File

@ -13,6 +13,16 @@ $(document).ready(function() {
// Activate all tooltips
$('[data-bs-toggle="tooltip"]').tooltip();
// Activate select2s
$(".select-2").each(function() {
var dropdownParent = $(this).attr("data-dropdownparent");
$(this).select2({
theme: "bootstrap",
minimumResultsForSearch: 5,
dropdownParent: dropdownParent
})
});
// Load theme
var theme = localStorage.getItem("theme");
if (theme === null)