Monday, 27 August 2018

Jquery Pop Up example for login and Registration form

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
 
  <style>
#login{
display:none;
}
#register{
display:none;

}
</style>

<script>
$(document).ready(function(){
    $("#click1").click(function(){
        $("#login").show();
  $("#register").hide();
    });
});

$(document).ready(function(){
    $("#click2").click(function(){
        $("#register").show();
  $("#login").hide();
    });
});
</script>
</head>
<body>

<div class="container">
  <h2>Modal Example</h2>
  <!-- Trigger the modal with a button -->
  <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Login</button>

  <!-- Modal -->
  <div class="modal fade" id="myModal" role="dialog">
    <div class="modal-dialog">
   
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Modal Header</h4>
        </div>
        <div class="modal-body">
          <p><button  id=click1> login</button>
<button  id=click2> Register</button>

<div id="login">

<form action=login.php  method=post>
Make Login
 email <input type=text name=email>
 password<input type=password  name=password>
 <input type=submit name=submit value=Login>
</form>



</div>

<div id="register">
Make Registration

<form action=register.php  method=post>
 email <input type=text name=email>
 password<input type=password  name=password>
 confirm password<input type=password  name=password>
 <input type=submit name=submit value=Login>
</form>

</div>
         
         
          </p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
     
    </div>
  </div>
 
</div>

</body>
</html>

Browsers

Powered by Blogger.

Feature Post

About Me

My photo
B.E.(COMPUTER ENGINEER) PHP Web developer & Provide Training for Web Development , Digital Marketing ,Android Mobile Apps Development

Post Slider (Homepage)

Blog Archive

Malwares

Transfer Files

Media Players

Download Manager

Window

Torrents Soft

Developer Tools

Botton Ad

Ads

Newsletter

 

© 2013 PHP TRAINING IN MUMBAI BY OM SIR . All rights resevered. Designed by OM SIR

Back To Top