最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - jQuery: Custom Pagination for Slides - Stack Overflow

programmeradmin1浏览0评论

I am using Slides, a slideshow plugin for jQuery and am wondering how to implement custom pagination HTML. Currently, when there is only one image, it will disable pagination by default, which is what I want. But when there are multiple images, it will output the following HTML for pagination:

<ul class="pagination"></ul>

I want something more like

<div class="more-views">
    <h2>More Views:</h2>
    <ul class="pagination"></ul>
</div>

How can I change the way it auto generates the pagination?

I am using Slides, a slideshow plugin for jQuery and am wondering how to implement custom pagination HTML. Currently, when there is only one image, it will disable pagination by default, which is what I want. But when there are multiple images, it will output the following HTML for pagination:

<ul class="pagination"></ul>

I want something more like

<div class="more-views">
    <h2>More Views:</h2>
    <ul class="pagination"></ul>
</div>

How can I change the way it auto generates the pagination?

Share Improve this question asked Jan 15, 2012 at 8:37 johnjohn 3,1036 gold badges33 silver badges48 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

You can customise the pagination to an extent, see http://slidesjs./#examples

However if you wanted to edit the generated pagination you would have to go and edit the actual plugin source.

  1. Generate Pagination: $('#slides').slides({generatePagination: true,
  2. Hide it $('.pagination').hide();
  3. Use this function in your code:
function GoToPage(i){       
    $('.pagination li:eq('+ i +') a').click();
}
发布评论

评论列表(0)

  1. 暂无评论