Today now in this post i would like to show you How to use collapse example in Bootstrap? Sometimes we need to collapse for display the large text with title. Always we like to use collapse for the data content. So if we think about how to use collapse in your project then it is very easy you need to just copy the bellow example and need to run in our local then we will find the result.
Now in this example i will provide bootstrap collapse example also with code so it pretty simple to use.
Example:
<html lang="en">
<head>
<title>Bootstrap collapse example</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
<a class="btn btn-danger" role="button" data-toggle="collapse" href="#collapseExp" aria-expanded="false" aria-controls="collapseExp">
Link with href
</a>
<!-- collapse contain -->
<div class="collapse" id="collapseExp">
<div class="well">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
<!-- collapse contain end -->
</body>
</html>
Read Also : How to convert Object into Array in PHP?
Thanks for read. I hope it help you. For more you can follow us on facebook.