Skip to main content
amberc3152909
Participating Frequently
July 25, 2018
Answered

2 column multiple modal images

  • July 25, 2018
  • 1 reply
  • 3454 views

Hello,

I'm trying to create multiple modal images that are in 2 columns on my webpage. I was using the template from w3 schools, but I can't seem to figure out how to make multiple images modal. I can only get the first one. How would I be able to do this? Here is my script below for my images. I want to be able to click on the image and have a full size image come up.

<div class="row">

  <div class="column"> <a href="images/Worden_Looking_West_a.jpg" target="new"><img src="images/Worden_Looking_West_w.jpg" alt="Worden Looking West Toward Allegany" style="width:100%"></a>

    <div class="w3-container">

        <h5>Worden Looking West Toward Allegany</h5>

    </div>   

  </div>

  <div class="column">

    <img src="images/worden002w.jpg" alt="Friedsam Memorial Library" style="width:100%">

    <div class="w3-container">

        <h5>Friedsam Memorial Library</h5>

    </div>

  </div>

  <div class="column">

    <img src="images/worden003w.jpg" alt="Alumni Hall" style="width:100%">

    <div class="w3-container">

        <h5>Alumni Hall </h5>

    </div>

  </div>

  <div class="column">

    <img src="images/worden004w.jpg" alt="Shrine of St. Theresa" style="width:100%">

    <div class="w3-container">

        <h5>Shrine of St. Theresa</h5>

    </div>

  </div>

  <div class="column">

    <img src="images/worden005w.jpg" alt="Friedsam Memorial Library" style="width:100%">

    <div class="w3-container">

        <h5>Friedsam Memorial Library</h5>

    </div>

  </div>

  <div class="column">

    <img src="images/worden006w.jpg" alt="Friedsam Memorial Library" style="width:100%">

    <div class="w3-container">

        <h5>Friedsam Memorial Library</h5>

    </div>

  </div>

</div>

    This topic has been closed for replies.
    Correct answer osgood_

    https://forums.adobe.com/people/Nancy+OShea  wrote

    The reason I suggested Fancybox 3 over other lightbox type scripts is because it's better than the rest.   A lot of thought went into it.    Fancybox 3 not only supports modal images but also AJAX, YouTube, Vimeo, iFrames, etc...   A single commercial licence only costs USD $29.   And if you already own a license for Fancybox 2, you're good to go.   You don't need to buy another one.

    $29 dollars each time you deploy it or you could buy the extended licence $119 dollars - a whopping 76kbs js/css or code your own....15mins or find a free one by Googling.


    Like here url below, only 12kbs plus a few lines of css

    Gallery with modal preview

    1 reply

    Legend
    July 25, 2018

    First lets estabish what workflow - method you want to use before wasting everyones time which this forum seems to have  a habit of doing these days.

    Do you want to do this using:

    1, Bootstrap,

    2, jQuery

    3, Vanilla javacript

    4, Vue

    5, React

    6, Angular

    7, Pure css no frameworks

    If you respond with a workflow similar to one which I use, I'll provide a solution. If you dont I'll leave it to someone else.

    amberc3152909
    Participating Frequently
    July 25, 2018

    I need to stay with CSS, HTML, and Javascript

    Legend
    July 25, 2018

    amberc3152909  wrote

    I need to stay with CSS, HTML, and Javascript

    Wrong answer.........someone else will have to help you but I'd advice you post in another forum where they can actually code vanilla javascript (if that is what you mean) because most in this forum only know how to deploy Bootstrap solutions.