我在 WP 网站上使用 RoyalSlider,并且像大多数滑块一样,它使用溢出:隐藏属性。这当然是正常的 - 但每张幻灯片的标题不能移动到滑块包装之外,因为它会由于溢出而被剪裁。
我想知道是否有人可以因此帮助我使用一些 JS/jQuery 来使用包装器内的标题内容更新包装器外部 div 的内容,以便在每张幻灯片移动时,包装器外部的 div 更新和充当真正的标题。如果这是有道理的。
这是我当前的滑块 HTML 和随附的 jQuery(由于 WP 插件而变得混乱)。
非常感谢,R
<div class="landing-slider-container">
<div id="royalslider-1" class="royalSlider default" style="width:1025px; height:600px;">
<ul class="royalSlidesContainer">
<li data-src="EVA-BERENDES-0263.jpg" class="royalSlide">
<div class="royalHtmlContent">
People & Events Will Be The Decoration<br>
19 Feb - 16 Apr
</div>
</li>
<li data-src="EVA-BERENDES-0263.jpg" class="royalSlide">
<div class="royalHtmlContent">
People & Events Will Be The Decoration<br>
19 Feb - 16 Apr
</div>
</li>
</ul>
</div>
<script type="text/javascript">
jQuery(document).ready(function() {jQuery("#royalslider-1").royalSlider({"width":1025,"height":600,"skin":"default","preloadSkin":true,"lazyLoading":true,"preloadNearbyImages":true,"slideshowEnabled":false,"slideshowDelay":5000,"slideshowPauseOnHover":true,"slideshowAutoStart":true,"keyboardNavEnabled":true,"dragUsingMouse":false,"slideSpacing":50,"startSlideIndex":0,"imageAlignCenter":true,"imageScaleMode":"none","autoScaleSlider":false,"autoScaleSliderWidth":960,"autoScaleSliderHeight":400,"slideTransitionType":"move","slideTransitionSpeed":400,"slideTransitionEasing":"easeInOutSine","directionNavEnabled":false,"directionNavAutoHide":false,"hideArrowOnLastSlide":true,"controlNavigationType":"none","auto-generate-images":false,"auto-generate-thumbs":false,"thumb-width":60,"thumb-height":60,"captionAnimationEnabled":true,"captionShowFadeEffect":true,"captionShowMoveEffect":"movetop","captionMoveOffset":20,"captionShowSpeed":400,"captionShowEasing":"easeInOutSine","captionShowDelay":200,"controlNavEnabled":false,"captionShowEffects":["fade","movetop"]});});
</script>
<div id="current-caption"></div>