Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and works. Contact: aviboots(AT)netvision.net.il
GreenGeeks Web Hosting - Faster, Scalable & Eco-Friendly

BlueHost Web Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

getflywheel wordpress hosting


Distribute your Resume to 500+ Job Boards & Recruiters


7,804 questions

10,890 answers

573 users

How to create collapsible panel group like accordion with Bootstrap

1 Answer

0 votes
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <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.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
 
<div class="container">
  <div class="panel-group" id="accordion">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion" 
                                    href="#collapse1-id">Click to collapse 1</a>
        </h4>
      </div>
      <div id="collapse1-id" class="panel-collapse collapse in">
        <div class="panel-body">    
        1. Bootstrap is a free and open-source front-end web framework for designing <br />
        websites and web applications. <br />
        It contains HTML and CSS.</div>
      </div>
    </div>
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion" 
                                    href="#collapse2-id">Click to collapse 2</a>
        </h4>
      </div>
      <div id="collapse2-id" class="panel-collapse collapse">
        <div class="panel-body">
        2. Bootstrap is a free and open-source front-end web framework for designing <br />
        websites and web applications. <br />
        It contains HTML and CSS.</div>
      </div>
    </div>
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion" 
                                    href="#collapse3-id">Click to collapse 3</a>
        </h4>
      </div>
      <div id="collapse3-id" class="panel-collapse collapse">
        <div class="panel-body">
        3. Bootstrap is a free and open-source front-end web framework for designing <br />
        websites and web applications. <br />
        It contains HTML and CSS.</div>
      </div>
    </div>
  </div> 
</div>

</body>
</html>

 




answered Jul 20, 2017 by avibootz
...