2
我想在jssor滑塊(http://www.jssor.com/demos/simple-fade-slideshow.html)上顯示幻燈片計數,如「14的2」,「14的3」,...。 (隨着滑塊隨滑塊移動)Jssor Slider計數幻燈片/圖像
有沒有一種方法可以使這項工作? Thx提前
我想在jssor滑塊(http://www.jssor.com/demos/simple-fade-slideshow.html)上顯示幻燈片計數,如「14的2」,「14的3」,...。 (隨着滑塊隨滑塊移動)Jssor Slider計數幻燈片/圖像
有沒有一種方法可以使這項工作? Thx提前
2步去,
添加靜態元素(其中,顯示索引)在 '幻燈片' 容器。
<!-- Slides Container -->
<div u="slides" ...>
...
<div id="displayIndex" u="any" style="position: absolute; bottom: 10px; left: 10px; width: 100px; height: 26px;"></div>
</div>
使用javascript調用顯示索引。
var jssor_slider1 = new $JssorSlider$(...;
function DisplayIndex() {
$("#displayIndex").text(jssor_slider1.$CurrentIndex() + 1 + " of " + jssor_slider1.$SlidesCount());
}
DisplayIndex();
jssor_slider1.$On($JssorSlider$.$EVT_PARK, DisplayIndex);
見http://www.jssor.com/testcase/slider-display-index.source.html
THX!很棒! – Luna84 2014-08-31 16:54:10