Advertisement
Guest User

Untitled

a guest
Nov 28th, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. <!doctype html>
  2.  
  3. <html>
  4. <head>
  5. <meta charset="utf-8" />
  6. <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
  7. <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
  8. <script src="/resources/demos/external/jquery.bgiframe-2.1.2.js"></script>
  9. <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
  10. <link rel="stylesheet" href="/resources/demos/style.css" />
  11. <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/blitzer/jquery-ui.css" type="text/css" />
  12. <link href="timepicker.css" rel="stylesheet" type="text/css">
  13. <script src="timepicker.js"></script>
  14.  
  15.  
  16. <style>
  17. body { font-size: 62.5%; }
  18. label, input { display:block; }
  19. input.text { margin-bottom:12px; width:95%; padding: .4em; }
  20. fieldset { padding:0; border:0; margin-top:25px; }
  21. h1 { font-size: 1.2em; margin: .6em 0; }
  22. div#time-contain { width: 350px; margin: 20px 0; }
  23. div#time-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
  24. div#time-contain table td, div#time-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
  25. .ui-dialog .ui-state-error { padding: .3em; }
  26. .validateTips { border: 1px solid transparent; padding: 0.3em; }
  27. </style>
  28. <script>
  29. // $(document).ready(function() {
  30. // $('#timepick').on("click", function(){
  31. // timepicker({
  32. // showPeriod: true,
  33. // showLeadingZero: true
  34. // });
  35. // });
  36.  
  37. $(document).ready(function() {
  38. $('#timepick').timepicker({
  39. showPeriod: true,
  40. showLeadingZero: true
  41. });
  42. });
  43.  
  44. $(function() {
  45. $( "#dialog-form" ).dialog({
  46. autoOpen: false,
  47. height: 300,
  48. width: 350,
  49. modal: true,
  50. buttons: {
  51. "Add Time": function() {
  52. $( "#time-table tbody" ).append( "<tr>" +
  53. "<td>" + time.value + "</td>" +
  54. "</tr>" );
  55. $( this ).dialog( "close" );
  56. },
  57. Cancel: function() {
  58. $( this ).dialog( "close" );
  59. }
  60. },
  61. });
  62.  
  63. $("#add-time").button().click(function() {
  64. $( "#dialog-form" ).dialog( "open" );
  65. });
  66. });
  67. </script>
  68. </head>
  69. <body>
  70.  
  71. <div id="dialog-form" title="Create new user">
  72. <p class="validateTips">All form fields are required.</p>
  73.  
  74. <form>
  75. <fieldset>
  76. <label for="time">Time</label>
  77. <input type="text" id="time" name="time" style="width: 70px;" id="timepick" value="01:30 PM" />
  78. </fieldset>
  79. </form>
  80. </div>
  81.  
  82.  
  83. <div id="time-contain" class="ui-widget">
  84. <table id="time-table" class="ui-widget ui-widget-content">
  85. <thead>
  86. <tr class="ui-widget-header ">
  87. <th>Time</th>
  88. </tr>
  89. </thead>
  90. <tbody>
  91. <tr>
  92. <td>1:50 PM</td>
  93. </tr>
  94. </tbody>
  95. </table>
  96. </div>
  97.  
  98. </body>
  99. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement