Advertisement
michaelyuen

Untitled

Jun 16th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  5. <script
  6.   src="https://code.jquery.com/jquery-2.2.4.min.js"
  7.   integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
  8.   crossorigin="anonymous"></script>
  9. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  10. </head>
  11. <style>
  12.     #appartment_modal {
  13.         display: none;
  14.         position: fixed;
  15.         top: 80px;
  16.         left: 0;
  17.         right: 0;
  18.         margin: 0 auto;
  19.         width: 400px;
  20.         z-index: 5;
  21.         text-align: center;
  22.         padding: 80px;
  23.         background-color: rgba(0,0,0,0.6);
  24.     }
  25.    
  26.     #result {
  27.         margin-top: 20px;
  28.         padding: 20px;
  29.         background-color: #fff;
  30.     }
  31. </style>
  32. <body>
  33. <div id="appartment_modal">
  34.     <form id="appartment">
  35.         <input type="text" id="test" name="test">
  36.         <div id="result"></div>
  37.     </form>
  38. </div>
  39. <div class="container" style="padding: 60px;">
  40.         <div class="row centered-form">
  41.         <div class="col-xs-12 col-sm-8 col-md-4 col-sm-offset-2 col-md-offset-4">
  42.             <div class="panel panel-default">
  43.                 <div class="panel-heading">
  44.                         <h3 class="panel-title">Please sign up for Bootsnipp <small>It's free!</small></h3>
  45.                         </div>
  46.                         <div class="panel-body">
  47.                         <form role="form">
  48.                             <div class="row">
  49.                                 <div class="col-xs-6 col-sm-6 col-md-6">
  50.                                     <div class="form-group">
  51.                             <input type="text" name="first_name" id="first_name" class="form-control input-sm" placeholder="First Name">
  52.                                     </div>
  53.                                 </div>
  54.                                 <div class="col-xs-6 col-sm-6 col-md-6">
  55.                                     <div class="form-group">
  56.                                         <input type="text" name="last_name" id="last_name" class="form-control input-sm" placeholder="Last Name">
  57.                                     </div>
  58.                                 </div>
  59.                             </div>
  60.  
  61.                             <div class="form-group">
  62.                                 <input type="adress" name="address" id="address" class="form-control input-sm" placeholder="Address">
  63.                             </div>
  64.  
  65.                             <div class="row">
  66.                                 <div class="col-xs-6 col-sm-6 col-md-6">
  67.                                     <div class="form-group">
  68.                                         <input type="password" name="password" id="password" class="form-control input-sm" placeholder="Password">
  69.                                     </div>
  70.                                 </div>
  71.                                 <div class="col-xs-6 col-sm-6 col-md-6">
  72.                                     <div class="form-group">
  73.                                         <input type="password" name="password_confirmation" id="password_confirmation" class="form-control input-sm" placeholder="Confirm Password">
  74.                                     </div>
  75.                                 </div>
  76.                             </div>
  77.                            
  78.                             <input type="submit" value="Register" class="btn btn-info btn-block">
  79.                        
  80.                         </form>
  81.                     </div>
  82.                 </div>
  83.             </div>
  84.         </div>
  85.    </div>
  86. <script>
  87.     $('#address').click(function(){
  88.         $('#appartment_modal').show();
  89.         $('#test').focus();
  90.     });
  91.    
  92.     $('#test').keyup(function(){
  93.         var val = $(this).val();
  94.         // your ajax here
  95.         $('#result').text(val);
  96.     });
  97. </script>
  98. </body>
  99. <html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement