您好,欢迎来到源码搜藏!分享精神,快乐你我!提示:担心找不到本站?在百度搜索“源码搜藏”,网址永远不丢失!
  • 首 页
  • 在线工具
  • 当前位置:首页 > 网页特效 > 相册代码 >

    键盘按键控制的全屏相册

    时间:2014-06-30 18:03 来源:互联网 作者:源码搜藏 浏览:收藏 挑错 推荐 打印

    效果预览 进入下载地址列表

    键盘按键控制的全屏相册键盘按键控制的全屏相册是一款支持键盘方向按键控制的全屏相册 文字广告特效代码。js键盘控制全屏相册代码 所属专题:相册代码


    <script>
    (function() {


    var overlay = document.getElementById( 'overlay' ),
    overlayClose = overlay.querySelector( 'button' ),
    header = document.getElementById( 'header' )
    switchBtnn = header.querySelector( 'button.slider-switch' ),
    toggleBtnn = function() {
    if( slideshow.isFullscreen ) {
    classie.add( switchBtnn, 'view-maxi' );
    }
    else {
    classie.remove( switchBtnn, 'view-maxi' );
    }
    },
    toggleCtrls = function() {
    if( !slideshow.isContent ) {
    classie.add( header, 'hide' );
    }
    },
    toggleCompleteCtrls = function() {
    if( !slideshow.isContent ) {
    classie.remove( header, 'hide' );
    }
    },
    slideshow = new DragSlideshow( document.getElementById( 'slideshow' ), { 
    // toggle between fullscreen and minimized slideshow
    onToggle : toggleBtnn,
    // toggle the main image and the content view
    onToggleContent : toggleCtrls,
    // toggle the main image and the content view (triggered after the animation ends)
    onToggleContentComplete : toggleCompleteCtrls
    }),
    toggleSlideshow = function() {
    slideshow.toggle();
    toggleBtnn();
    },
    closeOverlay = function() {
    classie.add( overlay, 'hide' );
    };


    // toggle between fullscreen and small slideshow
    switchBtnn.addEventListener( 'click', toggleSlideshow );
    // close overlay
    overlayClose.addEventListener( 'click', closeOverlay );


    }());
    </script>

    键盘按键控制的全屏相册由源码搜藏网整理,转载请注明出处http://www.codesocang.com/texiao/xiangce/9742.html 源码搜藏承诺:本站所有资源无病毒,无弹窗,无干扰链接!