0
我使用jQuery Cycle 2创建滑块here。如何在jQuery Cycle 2 Div元素幻灯片上添加分页?
这里是我使用的代码:
<div class="cycle-slideshow"
data-cycle-fx="fade"
data-cycle-timeout="5000"
data-cycle-pager="#custom-pager"
data-cycle-pager-template="<strong><a href=#> {{slideNum}} </a></strong>"
data-cycle-slides="> div"
>
<div>
<div class="cycle-pager"></div>
<img src="http://slp.opteradev.com/images/uploads/sliders/Purple_Pixie%C2%AE_Loropetalum-_Carmen_Favorite.jpeg" alt="Carmen’s Favorites photographs" class="img-responsive" />
<p class="slider-caption"><p><strong>1. Purple Pixie® Loropetalum</strong></p>
<p>A garden favorite of many, Purple Pixie® Loropetalum is an excellent choice for a versatile, dwarf size, weeping loropetalum. You can use Purple Pixie as a groundcover, hanging basket, or a window box. This loropetalum offers rich purple foliage and, in spring, features showy magenta ribbon-like blooms. </p></p>
</div>
<div>
<div class="cycle-pager"></div>
<img src="http://slp.opteradev.com/images/uploads/sliders/Flirt%E2%84%A2_Nandina_-_Carmen_Favorite.jpeg" alt="Carmen’s Favorites photographs" class="img-responsive" />
<p class="slider-caption"><p><strong>2. Flirt™ Nandina</strong></p>
<p>Flirt™ Nandina features stunning, deep red new growth that accentuates the evergreen leaves. One of the best things about Flirt is that it keeps its beautiful color throughout summer unlike similar varieties. This nandina can be used as an accent, container planting, or a mass planting. </p></p>
</div>
<div>
<div class="cycle-pager"></div>
<img src="http://slp.opteradev.com/images/uploads/sliders/Mojo%C2%AE_Pittosporum_-_Carmen_Favorite.jpeg" alt="Carmen’s Favorites photographs" class="img-responsive" />
<p class="slider-caption"><p><strong>3. Mojo® Pittosporum</strong></p>
<p>Mojo® Pittosporum offers so many great attributes. In the spring, its lovely dense green and yellow foliage is accompanied by orange blossom scented blooms. Mojo® is perfect for foundation plantings and hedges – and thrives well in coastal areas too! In addition, Mojo® is heat tolerant, drought tolerant and water-wise. </p></p>
</div>
<div>
<div class="cycle-pager"></div>
<img src="http://slp.opteradev.com/images/uploads/sliders/Bronze_Beauty%E2%84%A2_Cleyera_-_Carmen_Favorite.jpeg" alt="Carmen’s Favorites photographs" class="img-responsive" />
<p class="slider-caption"><p><strong>4. Bronze Beauty™ Cleyera</strong></p>
<p>What a beauty! Bronze Beauty™ Cleyera makes an ideal hedge with its rich bronze and green foliage and uniform look. Bronze Beauty isn't hard to please – it enjoys sun or shade and is heat tolerant. </p></p>
</div>
</div><!-- /.cycle-slideshow -->
我遇到的问题是,由于我使用div元素而非的img作为滑动对象的寻呼机代码(其也包含在一个div )被视为幻灯片元素,并显示为序列中的最后一张幻灯片,而不是作为寻呼机元素。
我查阅了关于寻呼机here的信息,但没有看到有关我的特殊情况的任何信息。
我将不胜感激关于如何解决此问题的任何帮助。
嗨迪伦,这是非常有帮助的。感谢您花时间提供协助。 – fmz 2015-02-13 16:55:27