(function($) { // Nur ausführen, wenn die Body-Klasse vorhanden ist if (!$('body').hasClass('festive-birthday')) { return; } const colors = [ '#e74c3c', '#3498db', '#2ecc71', '#f1c40f', '#e67e22', '#9b59b6', '#1abc9c', '#34495e', '#f39c12', '#d35400', '#FFB6C1', '#ADD8E6', '#98FB98', '#F0E68C', '#DDA0DD', '#FFD700', '#C0C0C0' ]; function createBalloon() { const size = 60 + Math.random() * 60; const duration = 12 + Math.random() * 8; const startX = Math.random() * 100; const selectedColor = colors[Math.floor(Math.random() * colors.length)]; // Der SVG-Code für einen Ballon const svgCode = '' + '' + '' + '' + ''; // Wir erstellen ein -Element und setzen den SVG-Code als src const $balloon = $('').attr('src', 'data:image/svg+xml;base64,' + btoa(svgCode)).css({ position: 'fixed', bottom: '-200px', left: startX + '%', zIndex: 999999, pointerEvents: 'none', userSelect: 'none', transform: 'translateX(-50%)', opacity: 0.9 }); $('body').append($balloon); $balloon.animate({ bottom: '120vh' }, { duration: duration * 1000, easing: 'linear', complete: function() { $(this).remove(); } }); } createBalloon(); setInterval(createBalloon, 1200); })(jQuery);