<tfoot id='iruGs'></tfoot>
      <legend id='iruGs'><style id='iruGs'><dir id='iruGs'><q id='iruGs'></q></dir></style></legend>

    1. <small id='iruGs'></small><noframes id='iruGs'>

          <bdo id='iruGs'></bdo><ul id='iruGs'></ul>
        <i id='iruGs'><tr id='iruGs'><dt id='iruGs'><q id='iruGs'><span id='iruGs'><b id='iruGs'><form id='iruGs'><ins id='iruGs'></ins><ul id='iruGs'></ul><sub id='iruGs'></sub></form><legend id='iruGs'></legend><bdo id='iruGs'><pre id='iruGs'><center id='iruGs'></center></pre></bdo></b><th id='iruGs'></th></span></q></dt></tr></i><div id='iruGs'><tfoot id='iruGs'></tfoot><dl id='iruGs'><fieldset id='iruGs'></fieldset></dl></div>
      1. 如何将刷卡器中的分页项目符号更改为文本?

        how to change the pagination bullet in a swiper to text?(如何将刷卡器中的分页项目符号更改为文本?)
          <legend id='DeIA4'><style id='DeIA4'><dir id='DeIA4'><q id='DeIA4'></q></dir></style></legend>
            <bdo id='DeIA4'></bdo><ul id='DeIA4'></ul>

            <small id='DeIA4'></small><noframes id='DeIA4'>

                  <tbody id='DeIA4'></tbody>

                  <i id='DeIA4'><tr id='DeIA4'><dt id='DeIA4'><q id='DeIA4'><span id='DeIA4'><b id='DeIA4'><form id='DeIA4'><ins id='DeIA4'></ins><ul id='DeIA4'></ul><sub id='DeIA4'></sub></form><legend id='DeIA4'></legend><bdo id='DeIA4'><pre id='DeIA4'><center id='DeIA4'></center></pre></bdo></b><th id='DeIA4'></th></span></q></dt></tr></i><div id='DeIA4'><tfoot id='DeIA4'></tfoot><dl id='DeIA4'><fieldset id='DeIA4'></fieldset></dl></div>
                1. <tfoot id='DeIA4'></tfoot>
                2. 本文介绍了如何将刷卡器中的分页项目符号更改为文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在我的项目中:

                  活动"变为绿色.

                  我读到(来自:http://idangero.us/swiper/api/)我可以用这个自定义:

                   paginationBulletRender: function (index, className) {return '<span class="' + className + '">'+ (index + 1) + '</span>';}

                  对不起,我迷路了,

                  怎么做?

                  解决方案

                  您应该改用 paginationCustomRender 来创建自定义设计.在每个 div 中定义您的 names

                  var mySwiper2 = new Swiper('.swiper-container.shoes', {//可选参数分页:'.pag-shoes',分页可点击:真,nextButton: '.swiper-button-next',prevButton: '.swiper-button-prev',spaceBetween: 30,循环:真,分页类型:自定义",paginationCustomRender:功能(刷卡器,当前,总计){变量名称 = [];$(".swiper-wrapper.swiper-slide").each(function(i) {names.push($(this).data("name"));});var text = "

                  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></脚本><link rel="stylesheet" href="http://moransh4.github.io/Luca/css/swiper.min.css"><script src="http://moransh4.github.io/Luca/js/swiper.jquery.min.js"></script><div class="swiper-container shoes"><div class="swiper-wrapper"><div class="swiper-slide" data-name="LEVEL1"><img src="http://placehold.it/600x300" alt=""></div><div class="swiper-slide" data-name="DESIGN"><img src="http://placehold.it/600x300" alt=""></div><div class="swiper-slide" data-name="PERFORMANCE"><img src="http://placehold.it/600x300" alt=""></div><div class="swiper-slide" data-name="DESIGN"><img src="http://placehold.it/600x300" alt=""></div></div><!-- 添加分页--><div class="swiper-pagination pag-shoes"></div><!-- 添加箭头--><div class="swiper-button-next">></div><div class="swiper-button-prev"><</div></div>

                  In my project : http://moransh4.github.io/Luca/

                  I need to change the swiper-pagination-bullet at the last section to this:

                  The "active" change to green.

                  I read ( from : http://idangero.us/swiper/api/) that i can customize with this :

                   paginationBulletRender: function (index, className) {
                          return '<span class="' + className + '">' + (index + 1) + '</span>';
                      }
                  

                  Sorry i go lost with it,

                  How to do it?

                  解决方案

                  You should instead use paginationCustomRender to create custom design.Define your names in each div

                  var mySwiper2 = new Swiper('.swiper-container.shoes', {
                    // Optional parameters
                    pagination: '.pag-shoes',
                    paginationClickable: true,
                    nextButton: '.swiper-button-next',
                    prevButton: '.swiper-button-prev',
                    spaceBetween: 30,
                    loop: true,
                    paginationType: "custom",
                    paginationCustomRender: function(swiper, current, total) {
                      var names = [];
                      $(".swiper-wrapper .swiper-slide").each(function(i) {
                        names.push($(this).data("name"));
                      });
                      var text = "<span style='background-color:black;padding:20px;'>";
                      for (let i = 1; i <= total; i++) {
                        if (current == i) {
                          text += "<span style='border-top:1px solid green;margin-right:4px;color:green;padding:10px;'>" + names[i] + "</span>";
                        } else {
                          text += "<span style='border-top:1px solid white;margin-right:4px;color:white;padding:10px;'>" + names[i] + "</span>";
                        }
                  
                      }
                      text += "</span>";
                      return text;
                    }
                  
                  });

                  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
                  <link rel="stylesheet" href="http://moransh4.github.io/Luca/css/swiper.min.css">
                  <script src="http://moransh4.github.io/Luca/js/swiper.jquery.min.js"></script>
                  <div class="swiper-container shoes">
                    <div class="swiper-wrapper">
                      <div class="swiper-slide" data-name="LEVEL1">
                        <img src="http://placehold.it/600x300" alt="">
                      </div>
                      <div class="swiper-slide" data-name="DESIGN">
                        <img src="http://placehold.it/600x300" alt="">
                      </div>
                      <div class="swiper-slide" data-name="PERFORMANCE">
                        <img src="http://placehold.it/600x300" alt="">
                      </div>
                      <div class="swiper-slide" data-name="DESIGN">
                        <img src="http://placehold.it/600x300" alt="">
                      </div>
                    </div>
                    <!-- Add Pagination -->
                    <div class="swiper-pagination pag-shoes"></div>
                    <!-- Add Arrows -->
                    <div class="swiper-button-next">></div>
                    <div class="swiper-button-prev">
                      <</div>
                    </div>

                  这篇关于如何将刷卡器中的分页项目符号更改为文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Youtube iframe api not triggering onYouTubeIframeAPIReady(Youtube iframe api 未触发 onYouTubeIframeAPIReady)
                  Embed YouTube video - Refused to display in a frame because it set #39;X-Frame-Options#39; to #39;SAMEORIGIN#39;(嵌入 YouTube 视频 - 拒绝显示在框架中,因为它将“X-Frame-Options设置为“SAMEORIGIN)
                  Stop embedded youtube iframe?(停止嵌入 youtube iframe?)
                  YouTube iframe API: how do I control an iframe player that#39;s already in the HTML?(YouTube iframe API:如何控制 HTML 中已有的 iframe 播放器?)
                  How to detect window size and then do something with jquery switch statement(如何检测窗口大小然后用 jquery switch 语句做一些事情)
                  jquery Using ranges in switch cases?(jquery 在切换案例中使用范围?)

                3. <i id='G6beR'><tr id='G6beR'><dt id='G6beR'><q id='G6beR'><span id='G6beR'><b id='G6beR'><form id='G6beR'><ins id='G6beR'></ins><ul id='G6beR'></ul><sub id='G6beR'></sub></form><legend id='G6beR'></legend><bdo id='G6beR'><pre id='G6beR'><center id='G6beR'></center></pre></bdo></b><th id='G6beR'></th></span></q></dt></tr></i><div id='G6beR'><tfoot id='G6beR'></tfoot><dl id='G6beR'><fieldset id='G6beR'></fieldset></dl></div>
                  • <small id='G6beR'></small><noframes id='G6beR'>

                    1. <legend id='G6beR'><style id='G6beR'><dir id='G6beR'><q id='G6beR'></q></dir></style></legend>

                        <bdo id='G6beR'></bdo><ul id='G6beR'></ul>
                          <tbody id='G6beR'></tbody>
                        <tfoot id='G6beR'></tfoot>