"Login form in a modal"
Bootstrap 3.0.0 Snippet by fakhreddine

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <a class="btn btn-primary" data-toggle="modal" href="#myModal" >Login</a> <div class="modal hide" id="myModal"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">x</button> <h3>Login to MyWebsite.com</h3> </div> <div class="modal-body"> <form method="post" action='' name="login_form"> <p><input type="text" class="span3" name="eid" id="email" placeholder="Email"></p> <p><input type="password" class="span3" name="passwd" placeholder="Password"></p> <p><button type="submit" class="btn btn-primary">Sign in</button> <a href="#">Forgot Password?</a> </p> </form> </div> <div class="modal-footer"> New To MyWebsite.com? <a href="#" class="btn btn-primary">Register</a> </div> </div> </div> </div>
body { margin-top:20px; } .modal-body:not(.two-col) { padding:0px } .glyphicon { margin-right:5px; } .glyphicon-new-window { margin-left:5px; } .modal-body .radio,.modal-body .checkbox {margin-top: 0px;margin-bottom: 0px;} .modal-body .list-group {margin-bottom: 0;} .margin-bottom-none { margin-bottom: 0; } .modal-body .radio label,.modal-body .checkbox label { display:block; } .modal-footer {margin-top: 0px;} @media screen and (max-width: 325px){ .btn-close { margin-top: 5px; width: 100%; } .btn-results { margin-top: 5px; width: 100%; } .btn-vote{ margin-top: 5px; width: 100%; } } .modal-footer .btn+.btn { margin-left: 0px; } .progress { margin-right: 10px; }
$(document).ready(function() { var panels = $('.vote-results'); var panelsButton = $('.dropdown-results'); panels.hide(); //Click dropdown panelsButton.click(function() { //get data-for attribute var dataFor = $(this).attr('data-for'); var idFor = $(dataFor); //current button var currentButton = $(this); idFor.slideToggle(400, function() { //Completed slidetoggle if(idFor.is(':visible')) { currentButton.html('Hide Results'); } else { currentButton.html('View Results'); } }) }); });

Related: See More


Questions / Comments: