pedroyanky
pedroyanky

Reputation: 323

bootstrap collapsing not working

hey I try using bootstrap to create some dropdown and collapsing, but it is not working at all. the supposed content are not displaying when clicked. Even though I copied the code directly from w3 schools. What exactly is the problem? I have jQuery downloaded and saved in thesame folder as my html file.

                         <head>
    <script src="jQuery.js"></script>
    <script src="bootstrap.js"></script>
    <link rel="stylesheet" href="bootstrap.css">
    <title>Bootsrap</title>
    <meta charset="UTF-8">
</head>

             <button data-toggle="collaspe" data-  target="#demo">Collapsible</button>
        <div id="demo" class="collapse">
            some will say that the way to go about doing some of the real things is by
            doing it by the book to avoid some of the boring things that are said in the 
            latter age of the new and humble heritage of the monk of the new age.
        </div>

i actualy have the bootstrap css and js imported to thesame folder with my html plus jquery too.

Upvotes: 0

Views: 36

Answers (2)

Carol Skelly
Carol Skelly

Reputation: 362300

Typo. Change data-toggle="collaspe" to data-toggle="collapse", and make sure your <button> is type="button"

<button type="button" data-toggle="collapse" data-target="#demo">Collapsible</button>
<div id="demo" class="collapse">
  some will say that the way to go about doing some of the real things is by
  doing it by the book to avoid some of the boring things that are said in the 
  latter age of the new and humble heritage of the monk of the new age.
</div>

Bootply

Upvotes: 2

Angel Olguin
Angel Olguin

Reputation: 59

Are you including jquery js before bootstrap js?

in your browser console (developers tool) can you see that this files are including correctly?

Upvotes: 0

Related Questions