MediaWiki: Tweeki.js: Unterschied zwischen den Versionen
Aus wiki-überbau
Admin (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung Markierung: Zurückgesetzt |
Admin (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung Markierung: Zurückgesetzt |
||
| Zeile 5: | Zeile 5: | ||
dropdownMenuHeight = dropdownMenu.outerHeight(); | dropdownMenuHeight = dropdownMenu.outerHeight(); | ||
if (dropdownMenuHeight > | if (dropdownMenuHeight > 900) { | ||
dropdownMenu.css({ 'overflow-y': 'scroll', 'max-height': ' | dropdownMenu.css({ 'overflow-y': 'scroll', 'max-height': '87vh' }); | ||
} else { | } else { | ||
dropdownMenu.css({ 'overflow-y': 'visible', 'max-height': 'none' }); | dropdownMenu.css({ 'overflow-y': 'visible', 'max-height': 'none' }); | ||
} | } | ||
}); | }); | ||
Version vom 30. Januar 2023, 17:09 Uhr
/* Any JavaScript here will be loaded for users using the Tweeki skin */
$('.dropdown-menu').on('show.bs.dropdown', function () {
var dropdown = $(this),
dropdownMenu = $('.dropdown-menu'),
dropdownMenuHeight = dropdownMenu.outerHeight();
if (dropdownMenuHeight > 900) {
dropdownMenu.css({ 'overflow-y': 'scroll', 'max-height': '87vh' });
} else {
dropdownMenu.css({ 'overflow-y': 'visible', 'max-height': 'none' });
}
});