简体   繁体   中英

Add Previous and Next to slider to JS

This slider is working great:

http://pastebin.com/BxN8vbAt

One thing I want to add is a Prev and Next

Anyone know how to make the Prev/Next links work properly?:

<ul>
    <li><a href="#">Prev</a></li>
    <li><a href="#">Opens Slide 1</a></li>
    <li><a href="#">Opens Slide 2</a></li>
    <li><a href="#">Opens Slide 3</a></li>
    <li><a href="#">Next</a></li>
</ul>

*Resolved

Add class link-prev and class link-next to your previous and next links.

<a href="#" class="link-prev">Prev</a>
<a href="#" class="link-next">Next</a>

And to make a pager use the class switcher on your ul. You will not be able to have your previous and next links in the ul however.

<ul class="switcher"></ul>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM