我想将一个值从 JSSOR 的幻灯片传递到 DOM 的其他部分。
标记:
<div class="slide">
<img data-u="image" src="bilder/bild2.jpg" />
<div class="caption" data-u="caption" ><p>Caption text</p></div>
</div>
JS:
jssor_slider1.$On($JssorSlider$.$EVT_PARK,function(slideIndex,fromIndex){
$(".outer-caption").text(currentCaption);
});
自定义 JSSOR 事件 EVT_PARK 工作正常。但是缺少的是如何获取当前幻灯片的标题并将其放入变量 currentCaption 中。怎么做?
如果是这样,我在哪里可以自己发现呢?