• <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
  • <th id="l3qpx"><progress id="l3qpx"></progress></th>
      <th id="l3qpx"></th>
      <dd id="l3qpx"><font id="l3qpx"></font></dd>
      <th id="l3qpx"></th>
      0712-2888027 189-8648-0214
      微信公眾號

      孝感風信網(wǎng)絡科技有限公司微信公眾號

      當前位置:主頁 > 技術支持 > Javascript/JQuery > Jquery countUp.js數(shù)字變換和滾動事件監(jiān)聽的實現(xiàn)代碼片段

      Jquery countUp.js數(shù)字變換和滾動事件監(jiān)聽的實現(xiàn)代碼片段

      時間:2018-03-27來源:風信官網(wǎng) 點擊: 1310次
      Jquery countUp.js數(shù)字變換和滾動事件監(jiān)聽的實現(xiàn)代碼片段,以下代碼為項目開發(fā)中的片段,實現(xiàn)方法思路僅供參考。

      $(function () {
          exposure._init();

          var videoNum = 0 || count.video;
          var teacherNum = 0 || count.teacher;
          var userNum = 0 || count.user;
          var csrfToken = $('meta[name="csrf-token"]').attr("content");
          //數(shù)字變換和滾動事件
          var options = {
              useEasing: true,
              useGrouping: true,
              separator: '',
              decimal: '.',
              prefix: '',
              suffix: ''
          };
          var countUp1 = new CountUp("videoNumSpan", 0, videoNum, 0, 2.5, options);
          var countUp2 = new CountUp("teacherNumSpan", 0, teacherNum, 0, 2.5, options);
          var countUp3 = new CountUp("userNumspan", 0, userNum, 0, 2.5, options);

          $(window).scroll(function () {
              //數(shù)字開始滾動
              if ($(window).scrollTop() >= jQuery("#videoNumSpan").offset().top - jQuery(window).height()) {
                  countUp1.start();
                  countUp2.start();
                  countUp3.start();
              }
          });    
       
      });
      欄目列表
      推薦內容
      熱點內容
      展開
      欧美一区二区三区免费A级视频,亚洲精品中文字幕综合,动漫精品中文字幕无码第一页,1024亚洲国产综合 亚太影院 柯西贝尔-游戏赚网
    1. <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
    2. <th id="l3qpx"><progress id="l3qpx"></progress></th>
        <th id="l3qpx"></th>
        <dd id="l3qpx"><font id="l3qpx"></font></dd>
        <th id="l3qpx"></th>