Marco Lau
Marco Lau

Reputation: 619

Twitter Bootstrap Collapse

I am trying to get a basic bootstrap collapse working. However, my current code does not expand or collapse the accordion. Instead, when you hit the button, the page jumps to where the accordion body is without collapsing it. I am really confused because it seems correct according to the bootstrap website. Here is my code:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Accordion</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<head>
<body>

<div class="container">

    <div class="accordion" id="status">
        <div class="accordion-group">
            <div class="accordion-heading">     
                <a class="accordion-toggle btn" data-toggle="collapse" data-parent="#status" href="#guru_status">Guru</a>
            </div>
            <div id="guru_status" class="accordion-body collapse">
                <div class="accordion-inner">
                    <p>Guru is not finished.</p>
                </div>
            </div>
        </div>
    </div>

    <div class="row">

        <h3>Project 2</h3>

        <p>Under Construction</p>

    </div>

    <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="bootstrap.min.js"></script>

</div>

Upvotes: 1

Views: 1238

Answers (1)

Alkis Kalogeris
Alkis Kalogeris

Reputation: 17745

<script type="text/javascript" src="bootstrap.min.js"></script> I have a feeling that this should be src="js/bootstrap.min.js

Upvotes: 4

Related Questions