SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Mar 2014
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with image gallery

    Hello,
    I was wondering if someone could help me with adding an image counter to this
    gallery. http://tympanus.net/Tutorials/ResponsiveImageGallery/
    something like image 2 of 16
    Thanks

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Hi landguy. Welcome to the forums.

    Did you read the article on this gallery? It explains the setup. http://tympanus.net/codrops/2011/09/...image-gallery/

    Read through that, give it a go and let us know if you get stuck. If you do, post a live link so we can check your work.

    EDIT: O, I misread your post. Presumably you have it working but want to add to it. Although it's doable, it might be better to find a gallery that already has numbers. I've seen people try to extend galleries like this, but it can cost a bit and doesn't seem worth it to me. Better to find a gallery that does what you need out of the box. There are hundreds of them.

    For example, check out Exposure: http://exposure.blogocracy.org/demos/demo3.html?v=0.9.1

  3. #3
    SitePoint Member
    Join Date
    Mar 2014
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ralph,
    Thanks for the reply. Yes i did have it working. But i was looking to add the counter to the current one.
    The example you gave me is a great alternative. Except my galleries have about 50 photos each so the numbers would run all the way across the screen. Something like this one but with thumbnail carousel http://exposure.blogocracy.org/demos/demo5.html?v=1.0.1
    Do you have any other examples. I've spent 2 days searching and have not found 1 that was responsive with a counter.
    Thank you very much.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    I still think Exposure is worth checking into further. It has various versions, and allows you, say, to have five or ten thumbnails appearing at once, with arrows to scroll to the next set. I've used it a few times and found it to work really well for galleries with hundreds of images.

  5. #5
    SitePoint Member
    Join Date
    Mar 2014
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was able to combine demo 5 with demo 3 by adding this to demo3
    // Update image counter.
    var imageSrc = image.attr('src');
    var imageNumber = gallery.indexOfImage(imageSrc)+1;
    var counterText = imageNumber + '/' + gallery.numberOfImages();
    var counter = $('#counter').text(counterText);

    and then added <p>Showing image: <span id="counter"></span></p>

    Capture.JPG

    Very Cool Thanks again

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    You're welcome. Glad you got a solution.


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
  •