Bootstrap Collapse Not Working Properly (Hide Not Working)
Answer :
Your code works! but, It doesn't work properly without jquery.
<!DOCTYPE html> <html lang="en"> <head> <title>Title</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <a href="#demo" data-toggle="collapse"><span class=”icon”>Collapsible</span></a> <div id="demo" class="collapse"> Sample Code </div> </div> </body> </html>
I had run into same trouble , there are many reasons for this , make sure that there are no repeated references in the page to bootstrap libraries , for me removing repeated reference worked .
Comments
Post a Comment