SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding simple Pagination to an existing Slideshow

    I'd like to add simple pagination to this existing script: http://sixrevisions.com/demo/slideshow/final.html & wonder if someone could help me with it.

    So basically it would count the number of <div class="slide"> instances and then generate a list (e.g. 1 - 2 - 3 - 4) and each has a hyperlink to that specific slide.

    I'm not so hot with Javascript so would love some help with this.

    Many thanks for any pointers :-)

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    I'd recommend you use something that's already written to do that, of which there are many. Here is a good one:

    http://bxslider.com/examples/manual-...-infinite-loop

    The options page explains how to change the dots at the bottom to digits.

  3. #3
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply :-)

    Out of interest, do you know if this slider allows you to replace <img> with <div> ?

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    I'm sure that would be fine, as the script acts on the <li>s rather than on the images. The bxSlider site must have been updated recently. The previous examples had text along with images inside each <li>. I don't see any reason why that can't still be done.

    There are other examples, like Anything Slider.

  5. #5
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply. Yep, I might take a look at Anything too.

    The documentation for using <div> content as opposed to <img> on bxslider is *very* hard to find :'(

    I'm basically wanting to use nested slideshows. So a parent and a child slideshow within it.

    Thanks for the help

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by invision2 View Post
    The documentation for using <div> content as opposed to <img> on bxslider is *very* hard to find :'(

    I'm basically wanting to use nested slideshows. So a parent and a child slideshow within it.
    I just tried replacing the img in bxSlider with a mixture of floated divs and images, and it worked fine. You just have to watch out for some of the styles that already apply to the slider.

    But I'm not sure what you mean by a "parent and a slideshow within it". Maybe I am missing the point.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •