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

Bonsai Boy of New York Bonsai Trees and Accessories

Website Domains Names & Hosting | Domain.com

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

DreamHost Web Hosting


Instant Grammar Checker - Correct all grammar errors and enhance your writing

Liquid Web Cloud VPS Hosting

Disclosure We are a professional Programming & Software Q&A website, that receives compensation from some of the links whose we show you with Information. It means that my content may contain affiliate links.

12,759 questions

17,366 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
...