MediaWiki: Tweeki.js: Unterschied zwischen den Versionen
Aus wiki-überbau
								
												
				| Admin (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung | Admin (Diskussion | Beiträge)  Keine Bearbeitungszusammenfassung Markierung: Zurückgesetzt | ||
| Zeile 1: | Zeile 1: | ||
| /* Any JavaScript here will be loaded for users using the Tweeki skin */ | /* 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 > 200) { | |||
|     dropdownMenu.css({ 'overflow-y': 'scroll', 'max-height': '200px' }); | |||
|   } else { | |||
|     dropdownMenu.css({ 'overflow-y': 'visible', 'max-height': 'none' }); | |||
|   } | |||
| }); | |||
Version vom 30. Januar 2023, 17:08 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 > 200) {
    dropdownMenu.css({ 'overflow-y': 'scroll', 'max-height': '200px' });
  } else {
    dropdownMenu.css({ 'overflow-y': 'visible', 'max-height': 'none' });
  }
});