seq-theme-two-up
Version:
A two column layout, one for showing content, the other a featured image
1 lines • 1.56 kB
JavaScript
function getWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function enableSwiping(){return mySequence.hammerTime!==!1?(windowWidth=getWindowWidth(),mySequence.hammerTime.get("swipe").set(windowWidth>769?{direction:Hammer.DIRECTION_ALL}:{direction:Hammer.DIRECTION_HORIZONTAL}),windowWidth):void 0}var sequenceElement=document.getElementById("sequence"),options={animateCanvas:!0,phaseThreshold:!1,preloader:!0,fadeStepWhenSkipped:!1,reverseWhenNavigatingBackwards:!0,swipeEvents:{left:function(a){a.next()},right:function(a){a.prev()},up:function(a){a.next()},down:function(a){a.prev()}},fallback:{speed:300}},mouseWheel={quietPeriod:1e3,animationTime:300},mySequence=sequence(sequenceElement,options);mySequence.ready=function(){function a(a){if(!(769>b)){if(a.preventDefault(),c=a.wheelDelta||-a.detail,deltaOfInterest=c,d=(new Date).getTime(),d-e<mouseWheel.quietPeriod+mouseWheel.animationTime)return void a.preventDefault();deltaOfInterest<0?mySequence.next():mySequence.prev(),e=d}}var b,c,d,e=0;b=enableSwiping(),mySequence.throttledResize=function(){b=enableSwiping()},mySequence.utils.addEvent(document,"mousewheel",a),mySequence.utils.addEvent(document,"DOMMouseScroll",a),mySequence.utils.addEvent(document.body,"keyup",function(a){switch(a.keyCode){case 32:case 39:a.preventDefault(),mySequence.next();break;case 34:case 40:b>768&&(a.preventDefault(),mySequence.next());break;case 37:a.preventDefault(),mySequence.prev();break;case 33:case 38:b>768&&(a.preventDefault(),mySequence.prev())}})};