Einzelnen Beitrag anzeigen
  #1 (permalink)  
Alt 16.01.2015, 21:36
Cu Chullain Cu Chullain ist offline
Erfahrener Benutzer
Registriert seit: 26.03.2008
Beiträge: 372
Cu Chullain befindet sich auf einem aufstrebenden Ast
Standard Split Layout mit vier Slides

I am trying to design a slide navigation with four slides.
I based my layout on this blueprint, by adapting the number of slides.

This is my testcase: Edit fiddle - JSFiddle

While the first (left) and last (right) slide both work fine, i failed to get the inner slides running properly. The problem arises, when the closing event occures, which is this part of code in the JS I suppose:

   // back to intro
            // after transition ends:
            var onEndTransFn = function () {
                this.removeEventListener(transEndEventName, onEndTransFn);
                classie.add(splitlayout, 'reset-layout');
                document.body.scrollTop = document.documentElement.scrollTop = 0;
            backToIntro = function (ev) {
                var dir = classie.has(ev.target, 'back-left') ? 'left' : 'right',
                    page = dir === 'right' ? pageRight : pageLeft;
                classie.remove(splitlayout, 'open-' + dir);
                classie.add(splitlayout, 'close-' + dir);
                page.addEventListener(transEndEventName, onEndTransFn);
The snipped is from the blueprint and designed for two slides only.
The result is, that the classes .open-innerleft and .open-innerright will not reset on closing the slides.

How can I adapt it for four slides?
Thank you very much in advance!
Cu Chullain

Geändert von Cu Chullain (17.01.2015 um 21:18 Uhr)
Mit Zitat antworten
Sponsored Links