Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9227537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:06:17+00:00 2026-06-18T05:06:17+00:00

I am using Lightbox 2 and I was wondering if you could give me

  • 0

I am using Lightbox 2 and I was wondering if you could give me some pointers. Right now this is how I am adding images:

<a href="IMAGE URL GOES HERE" rel="lightbox[gallery1]" title="TITLE HERE"></a>
<a href="IMAGE URL GOES HERE" rel="lightbox[gallery1]" title="TITLE HERE"></a>
<a href="IMAGE URL GOES HERE" rel="lightbox[gallery1]" title="TITLE HERE"></a>
<a href="IMAGE URL GOES HERE" rel="lightbox[gallery1]" title="TITLE HERE"></a>
<a href="IMAGE URL GOES HERE" rel="lightbox[gallery1]" title="TITLE HERE"></a>
<a href="IMAGE URL GOES HERE" rel="lightbox[gallery1]" title="TITLE HERE"></a>
etc.......

The idea with Lightbox is that all the images that have the same ‘gallery1’ tag in the rel will show up in the Lightbox gallery. My problem is that I don’t want to have to continually add images like this to the gallery one at a time. Is there a quicker, more efficient way to do this? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:06:18+00:00Added an answer on June 18, 2026 at 5:06 am

    You can put the file names in an array and loop through them in JS. Assuming you have jQuery, try this. Note, it would depend on the path to your files. Here’s a working fiddle.

    HTML:

    <ul id="photos-ul"></ul>

    JS:

    var fileNames = ["1","2","3"]; // put the filenames in an array and make the url correct in the loop
    for (i=0; i < fileNames.length; i++){
        $('#photos-ul').append("<li><a href='http://flicker.com/photo" + fileNames[i] + "'>Photo " + fileNames[i] + "</a></li>"); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using lightbox with a WordPress theme. It has defined some images path in
I'm using jQuery Lightbox for my image gallery. The URL for the button image
I was wondering if using Lightbox all over the site would be a smart
This is my first time using lightbox which uses jquery framework. But when I
Morning all, I'm fixing errors in a website and escaping a URL using lightbox
I'm using bootstrap-lightbox in order to show up certain images in a page. <a
I am using lightbox to show an image in php. My current code: <a
I am using the lightbox plugin to show popups in my app. Some popup's
how to set an image width and height in lightbox using jquery when first
Ok, so here's my problem. For a client I'm using a lightbox (in this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.