document.querySelector('#navbar-icon').addEventListener('click', function () {
// Wähle alle Elemente, die "slide-target" als Teil ihrer Klasse enthalten
const slidingElements = document.querySelectorAll('[class*="slide-target"]');
const menuWrapper = document.querySelector('.menu-outer-wrapper'); // Menü-Wrapper-Element
// Deaktiviert Scrollen, solange das Menü sichtbar ist
if (menuWrapper && window.getComputedStyle(menuWrapper).display !== 'none') {
disableScroll(); // Scrollen deaktivieren
}
slidingElements.forEach((slidingElement, index) => {
// Setze die Ausgangsposition zurück (off-screen)
slidingElement.style.transition = 'none';
slidingElement.style.opacity = '0'; // Unsichtbar machen
slidingElement.style.transform = 'translateX(100vw)'; // Ausgangsposition (rechts außerhalb)
// Lasse die Animation mit Verzögerung starten
setTimeout(() => {
slidingElement.style.transition = 'transform 1s ease-in-out, opacity 1s ease-in-out'; // Smooth transition
slidingElement.style.opacity = '1'; // Einfaden
slidingElement.style.transform = 'translateX(0)'; // Zurück zur Endposition
}, index * 100); // Verzögerung von 100ms pro Element
});
});
// Funktion zum Deaktivieren des Scrollens
function disableScroll() {
document.body.style.overflow = 'hidden'; // Verhindert Scrollen
document.body.style.height = '100%'; // Sicherstellen, dass die Höhe fixiert bleibt
// Blockiere auch Touch-Scrollen auf mobilen Geräten
document.addEventListener('touchmove', preventDefaultScroll, { passive: false });
document.addEventListener('wheel', preventDefaultScroll, { passive: false });
}
// Funktion zum Aktivieren des Scrollens
function enableScroll() {
document.body.style.overflow = ''; // Scrollen aktivieren
document.body.style.height = ''; // Höhe zurücksetzen
// Entferne die Event-Listener für Scroll-Blockade
document.removeEventListener('touchmove', preventDefaultScroll);
document.removeEventListener('wheel', preventDefaultScroll);
}
// Funktion, um Standard-Scrollen zu verhindern
function preventDefaultScroll(event) {
event.preventDefault();
}
// Überwacht Änderungen am Display-Status von menu-outer-wrapper
const observer = new MutationObserver(() => {
const menuWrapper = document.querySelector('.menu-outer-wrapper');
if (menuWrapper && window.getComputedStyle(menuWrapper).display === 'none') {
enableScroll(); // Scrollen aktivieren, wenn Menü ausgeblendet ist
}
});
// Beobachte das menu-outer-wrapper
const menuWrapper = document.querySelector('.menu-outer-wrapper');
if (menuWrapper) {
observer.observe(menuWrapper, { attributes: true, attributeFilter: ['style'] });
}
Oreo
Cheat Cookies
Leaving a mark – by cheating? You could say that's exactly what we did with CHEAT COOKIES. You see, playing is in our nature. So, when asked to initiate the brand partnership between gaming giant XBOX and the world's most playful cookie brand OREO, we went all-in to win. We left our mark by boosting sales, brand engagement, and brand likability, creating a campaign that earned us numerous trophies across various competitions.
Everyone loves to unlock hidden features and the easiest way to do it is by using cheat codes. A sequence of combinations that allow players to unlock special items in the game that are not available through standard play. To announce the partnership between OREO and Xbox, we used cheat codes to create a whole new gaming experience.
For the first time in Europe, OREO launched 6 different embossments inspired by the Xbox controller buttons. Beyond the new design, the cookies took on an innovative role allowing players to create unique cheat codes. Consumers could combine them to unlock exclusive in-game content within one of the world’s biggest gaming universes.
Impressions
6.7 billion
Stores
35,000
Countries
34
Items unlocked
827,419
Achievements
Cannes Lions NY Festivals ADC Clio Awards Spotlight Webby Deutscher Digital Award ADC Annual Best Agency 2023 die Klappe LIA CLIO Eurobest