0

我试图向每张幻灯片添加自定义文本,而不是使用项目符号。我试图将样式分配给名称。

我正在使用 ResponsiveSlides.js v1.53 https://github.com/viljamis/ResponsiveSlides.js/blob/master/README.md

这是该功能中的滑块和寻呼机有什么想法吗?

和脚本:

<script>
 $(".rslides").responsiveSlides({
  auto: true,             // Boolean: Animate automatically, true or false
  speed: 500,            // Integer: Speed of the transition, in milliseconds
  timeout: 4000,          // Integer: Time between slide transitions, in milliseconds
  pager: true,           // Boolean: Show pager, true or false
  nav: false,             // Boolean: Show navigation, true or false
  random: false,          // Boolean: Randomize the order of the slides, true or false
  pause: true,           // Boolean: Pause on hover, true or false
  pauseControls: true,    // Boolean: Pause when hovering controls, true or false
  prevText: "Previous",   // String: Text for the "previous" button
  nextText: "Next",       // String: Text for the "next" button
  maxwidth: "",           // Integer: Max-width of the slideshow, in pixels
  navContainer: "",       // Selector: Where controls should be appended to, default is after the 'ul'
  manualControls: "",     // Selector: Declare custom pager navigation
  namespace: "rslides",   // String: Change the default namespace used
  before: function(){},   // Function: Before callback
  after: function(){}     // Function: After callback
});
</script>

我的网站正在处理您会注意到滑块下方的寻呼机。忘记 ACF 错误。

http://mrblind.dev/aluminium-blinds/

4

1 回答 1

0

每个数字都在 .rslides_tab 类中,并且具有锚标记,其类以 rslides1_ 开头。因此,您可以使用 .each() 更改所有数字的文本,例如:

var i=0;
var arr = [ "one", "two", "three", "four", "five" ];
$(".rslides_tabs a[class^='rslides1_']").each(function(){
 $(this).text(arr[i]);
 i++;
});
于 2013-12-20T20:21:36.920 回答