WordPress.org

Ready to get started?Download WordPress

Forums

Multiple Lightboxes from text Links ? (2 posts)

  1. colingoldberg
    Member
    Posted 1 year ago #

    Hello, I have a project in which there will be a directory of vendors, with each vendor having a text link which will be the name of the business.

    What I wish to accomplish is that each link triggers the display of a large (1200x800) image (essentially, an ad for the vendor) in a lightbox pop-up that scales to the size of the browser window, ala colorbox, thickbox, etc.Some vendors will have multiple images which will comprise several "slides" in a lightbox gallery.

    Is there a way to do this via plug-ins, or a combinations of plug-ins and custom coding ? I have used jQuery Lightbox for native galleries, but have not figured out how to have the lightbox launched from a text link (versus a bunch of thumbnails) or having multiple galleries on the same page.

    The goals are :

    1) a list of text links within a page which each trigger a lightbox-style image display of an image or images.

    2) some links will only display a single image, with a "close window" link.

    3) other links will display a sequence of images in lightbox format, with "next" and "previous" navigation. This would require the placement of multiple galleries on the page.

    4) optimally, I want to make it something that is simple for the client to add new links and corresponding images without a lot of complex coding. He loves the "fullscreen" display of the lightbox-style plug-ins, and wants to incorporate this concept into the design.

    Thanks!
    Colin

  2. mydog8it
    Member
    Posted 1 year ago #

    You can do this with jQuery Lightbox for Native Galleries. Just add: class="cboxElement" to your links. Like this:

    <a href="http://yoursite.com/wp-content/uploads/2012/11/your-image.png" alt="whatever" class="cboxElement">Text Link</a>

    If you attach images to the post, you should get the next/previous arrows. Unattached images won't have the arrows.

Topic Closed

This topic has been closed to new replies.

About this Topic