Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. <form id="myform" class="form-wizard">
  2.  
  3. <h2 class="form-wizard-heading">BootStap Wizzard Form</h2>
  4. <input type="text" value="">
  5. <input type="submit">
  6. </form>
  7.  
  8.  
  9. <!-- Modal -->
  10. <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  11. <div class="modal-header">
  12. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  13. <h3 id="myModalLabel">Modal header</h3>
  14. </div>
  15. <div class="modal-body">
  16. <p>One fine body…</p>
  17. </div>
  18. <div class="modal-footer">
  19. <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
  20. <button class="btn btn-primary">Save changes</button>
  21. </div>
  22. </div>
  23.  
  24.  
  25.  
  26. $('#myform').on('submit', function(ev) {
  27. $('#my-modal').modal({
  28. show: 'false'
  29. });
  30.  
  31.  
  32. var data = $(this).serializeObject();
  33. json_data = JSON.stringify(data);
  34. $("#results").text(json_data);
  35. $(".modal-body").text(json_data);
  36.  
  37. // $("#results").text(data);
  38.  
  39. ev.preventDefault();
  40. });
  41.  
  42. $('#myModal').modal('toggle');
  43. $('#myModal').modal('show');
  44. $('#myModal').modal('hide');
  45.  
  46. $('#my-modal').modal({
  47. show: 'false'
  48. });
  49.  
  50. $('#myModal').modal('show');
  51.  
  52. <button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button>
  53.  
  54. input.btn.btn-primary type="button" data-toggle="modal" data-target="#myModal" value="Modal"
  55.  
  56. #myModal.modal.fade aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1"
  57. .modal-dialog
  58. .modal-content
  59. .modal-header
  60. button.close data-dismiss="modal" type="button"
  61. span aria-hidden="true" &times;
  62. span.sr-only Close
  63. h4#myModalLabel.modal-title Choose of route
  64. .modal-body
  65. = image_tag("map.png")
  66. .modal-footer
  67. button.btn.btn-default data-dismiss="modal" type="button" Close
  68. button.btn.btn-primary type="button" Save changes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement