How to display/hide accordion? [closed]

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)