Advertisement
Guest User

collapse

a guest
Sep 3rd, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
  5. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
  6. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  7. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
  8. <script type="text/javascript">
  9. $(document).ready(function(){<!--from w w w . j av a2s . c o m-->
  10. $(".btn").click(function(){
  11. $("#toggleDemo").collapse('toggle');
  12. });
  13. });
  14. </script>
  15. <style type="text/css">
  16. p{
  17. background: #F9F9F9;
  18. border: 1px solid #E1E1E8;
  19. margin: 10px 0;
  20. padding: 8px;
  21. }
  22. .bs-example{
  23. margin: 20px;
  24. }
  25. </style>
  26. </head>
  27. <body>
  28. <div class="bs-example">
  29. <!-- Trigger Button HTML -->
  30. <input type="button" class="btn btn-primary" value="Toggle Button">
  31. <!-- Collapsible Element HTML -->
  32. <div id="toggleDemo" class="collapse in"><p>
  33. this is a test. this is a test. this is a test.
  34. this is a test. this is a test. this is a test.
  35. this is a test. this is a test. this is a test.
  36. Click on the <b>Toggle Button</b> button to see the effect.</p></div>
  37. </div>
  38. </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement