最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

基于jQuery傾斜打開(kāi)側(cè)邊欄菜單特效代碼

 更新時(shí)間:2015年09月15日 13:01:08   作者:愛(ài)上程序猿  
基于jQuery多重圖片無(wú)限循環(huán)動(dòng)畫效果,本文給大家分享基于jQuery傾斜打開(kāi)側(cè)邊欄菜單特效代碼,感興趣的朋友可以參考下

基于jQuery多重圖片無(wú)限循環(huán)動(dòng)畫效果。這是一款非常實(shí)用的jQuery多圖片無(wú)限循環(huán)動(dòng)畫特效插件。

效果圖如下:

 

在線預(yù)覽    源碼下載

html代碼:

<div id="paper-back">
  <nav>
   <div class="close"></div>
   <a href="#">Home</a>
   <a href="#">About Us</a>
   <a href="#">Our Work</a>
   <a href="#">Contact</a>
  </nav>
 </div>
 <div id="paper-window">
  <div id="paper-front">
   <div class="hamburger"><span></span></div>
   <div id="container">
    <section>
     <p>點(diǎn)擊左上角的按鈕打開(kāi)菜單</p>
     <p>適用瀏覽器:、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗. <br>不支持IE及以下瀏覽器。</p>
     <p>
     <script src="/scripts/bc/_gg__.js" type="text/javascript"></script></p>
    </section>
    <section></section>
   </div>
  </div>
 </div>

js代碼:

var paperMenu = {
   $window: $('#paper-window'),
   $paperFront: $('#paper-front'),
   $hamburger: $('.hamburger'),
   offset: ,
   pageHeight: $('#paper-front').outerHeight(),
   open: function () {
    this.$window.addClass('tilt');
    this.$hamburger.off('click');
    $('#container, .hamburger').on('click', this.close.bind(this));
    this.hamburgerFix(true);
    // console.log('opening...');
   },
   close: function () {
    this.$window.removeClass('tilt');
    $('#container, .hamburger').off('click');
    this.$hamburger.on('click', this.open.bind(this));
    this.hamburgerFix(false);
    // console.log('closing...');
   },
   updateTransformOrigin: function () {
    scrollTop = this.$window.scrollTop();
    equation = (scrollTop + this.offset) / this.pageHeight * ;
    this.$paperFront.css('transform-origin', 'center ' + equation + '%');
   },
   hamburgerFix: function (opening) {
    if (opening) {
     $('.hamburger').css({
      position: 'absolute',
      top: this.$window.scrollTop() + + 'px'
     });
    } else {
     setTimeout(function () {
      $('.hamburger').css({
       position: 'fixed',
       top: 'px'
      });
     }, );
    }
   },
   bindEvents: function () {
    this.$hamburger.on('click', this.open.bind(this));
    $('.close').on('click', this.close.bind(this));
    this.$window.on('scroll', this.updateTransformOrigin.bind(this));
   },
   init: function () {
    this.bindEvents();
    this.updateTransformOrigin();
   }
  };
  paperMenu.init();

相關(guān)文章

最新評(píng)論

新巴尔虎右旗| 固安县| 凤台县| 曲松县| 资中县| 孙吴县| 清涧县| 肥乡县| 连平县| 浦北县| 临潭县| 黑龙江省| 东乡族自治县| 曲阜市| 长沙市| 台中市| 鹤庆县| 新和县| 宜兰县| 六盘水市| 平陆县| 班玛县| 雅安市| 麻栗坡县| 巴中市| 绍兴市| 泗阳县| 秭归县| 界首市| 乐都县| 兴宁市| 钦州市| 鄂伦春自治旗| 景泰县| 长武县| 璧山县| 互助| 河北省| 肃南| 株洲市| 武清区|