0

Hi on this website: http://everestabercorn.com/ if you scroll down to where their is 2 images next to each over and one says food on it and the over says drink. When that image is clicked text appears and goes when its clicked again. How can i do this?

1

That uses bootstraps data-toggle first make sure you have included the proper scripts and css for this usually its just these 4 which should be located in your header if its not included already.

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

then you can just the correct classes to the image / divs in question something like this:

    <div class="container">
     <h2>Simple Collapsible (click image)</h2>
     <img src="http://everestabercorn.com/wp-content/uploads/2016/03/9W4A4758.jpg" width="500px" class="btn btn-info" data-toggle="collapse" data-target="#demo">
     <div id="demo" class="collapse">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit,
      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
      quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
     </div>
    </div>

You can see it in action here I made a quick demo: Simple Collapsible Div

  • Wow, that's sick dude! ive added all that code in head but when i add that div code to a html text box the image isnt clickable. – Brandon Williams Apr 27 '18 at 15:59
  • Do you have a URL where I can see it implemented? – demo7up Apr 27 '18 at 16:52
  • can i give you my wp admin login details? – Brandon Williams Apr 27 '18 at 17:07
  • I just need a link to see where the image isnt clickable – demo7up Apr 27 '18 at 17:10
  • hi dude yeah sure it's thebellonthegreen.com but it's in maintebace mode – Brandon Williams Apr 28 '18 at 18:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.