1function setImageSliderHeight(query) { 2 var mediaQuery = query && typeof query.matches === 'boolean' 3 ? query 4 : window.matchMedia('(min-width: 700px)'); 5 6 if (mediaQuery.matches) { 7 // Warten bis Icon-Buttons verfügbar sind 8 var applyHeight = function () { 9 var largeButtons = $('.iconbuttons.iconbuttons-large'); 10 var smallButtons = $('.iconbuttons.iconbuttons-small'); 11 12 if (largeButtons.length > 0 && smallButtons.length > 0) { 13 var height1 = largeButtons.outerHeight(true) || 0; 14 var height2 = smallButtons.outerHeight(true) || 0; 15 var totalHeight = height1 + height2; 16 17 if (totalHeight > 0) { 18 $('#headerslider .slides img').height(totalHeight); 19 } 20 } else { 21 // Retry nach 50ms wenn Elemente noch nicht da sind 22 setTimeout(applyHeight, 50); 23 } 24 }; 25 26 applyHeight(); 27 } else { 28 $('#headerslider').css('height', ''); 29 $('#headerslider .slides img').css('height', ''); 30 } 31} 32 33$(document).ready(function () { 34 var viewport = window.matchMedia('(min-width: 700px)'); 35 36 // Warten bis alle Elemente geladen sind 37 setTimeout(function () { 38 setImageSliderHeight(viewport); 39 }, 100); 40 41 viewport.addEventListener('change', function (event) { 42 setImageSliderHeight(event); 43 }); 44});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.