Fehler: Animierte Boxen schließen auf dem Smartphone nicht automatisch

Produkt: Oneo Contao
Contao-Version: 5.7

ich verwende das Theme Oneo mit Contao 5.7.
Bei den animierten Boxen (ce_rsce_oneo_fading_boxes) auf Smartphones bleiben bereits geöffnete Boxen geöffnet, wenn eine weitere Box angetippt wird. Ich möchte erreichen, dass immer nur eine Box gleichzeitig geöffnet ist.
Das stellt sich auch auf Ihrer Demoseite so dar:https://oneo.demo.rocksolidthemes.com/one-pager#service
Können Sie mir bitte sagen, ob dieses Verhalten geändert werden kann?
Vielen Dank!

  1. Vielen Dank für Ihre Frage.

    Sie können dafür folgenden Code-Block aus der Datei files/oneo/js/script.js entfernen:

    // Rotating boxes touch support
    (function(elements) {
        if (!elements || !elements.length) {
            return;
        }
        for (var i = 0; i < elements.length; i++) {
            elements[i].setAttribute('aria-haspopup', 'true');
            addEvent(elements[i], 'touchend', function(event) {
                if (event.target && (
                    hasClass(event.target.parentNode, 'fading-boxes-item-link')
                    || hasClass(event.target, 'portfolio-boxes-item-more')
                )) {
                    return;
                }
                eventPreventDefault(event);
                // Remove the hover state from the element on iOS
                if (hasClass(this, 'is-hovered')) {
                    var parent = this.parentNode;
                    var next = this.nextSibling;
                    parent.removeChild(this);
                    if (next) {
                        parent.insertBefore(this, next);
                    }
                    else {
                        parent.appendChild(this);
                    }
                    this.offsetWidth;
                }
                toggleClass(this, 'is-hovered');
            });
        }
    })(document.querySelectorAll && document.querySelectorAll('.fading-boxes-item, .portfolio-boxes-item-text'));
    

    Danach wird der Mouse-Over-Effekt direkt über den Browser des Smartphones selbst gesteuert. Beachten Sie dabei bitte, dass diese :hover-Simulation jedoch nicht auf allen Touchscreen-Geräten und Browsern exakt gleich funktioniert und von einigen Faktoren abhängt.

  2. Super, vielen Dank für die Rückmeldung!

Reply to this discussion Internal reply only staff will see it

Markdown

Attaching KB article:

» »

Read more…

Already uploaded files

  • screenshot_boxen.jpg 893 KB
Attach files

Up to 10MB each.

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac