"Contact and Vote modal"
Bootstrap 3.1.0 Snippet by uniscope

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.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"> <br/><br/><br/> <a class="btn btn-primary btn-lg" data-toggle="modal" data-target="#vote" data-original-title> Vote Now! </a> <a class="btn btn-primary btn-lg" data-toggle="modal" data-target="#contact" data-original-title> Contact </a> <div class="modal fade" id="contact" tabindex="-1" role="dialog" aria-labelledby="contactLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="panel panel-primary"> <div class="panel-heading"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="panel-title" id="contactLabel"><span class="glyphicon glyphicon-info-sign"></span> Any questions? Feel free to contact us.</h4> </div> <form action="#" method="post" accept-charset="utf-8"> <div class="modal-body" style="padding: 5px;"> <div class="row"> <div class="col-lg-6 col-md-6 col-sm-6" style="padding-bottom: 10px;"> <input class="form-control" name="firstname" placeholder="Firstname" type="text" required autofocus /> </div> <div class="col-lg-6 col-md-6 col-sm-6" style="padding-bottom: 10px;"> <input class="form-control" name="lastname" placeholder="Lastname" type="text" required /> </div> </div> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12" style="padding-bottom: 10px;"> <input class="form-control" name="email" placeholder="E-mail" type="text" required /> </div> </div> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12" style="padding-bottom: 10px;"> <input class="form-control" name="subject" placeholder="Subject" type="text" required /> </div> </div> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12"> <textarea style="resize:vertical;" class="form-control" placeholder="Message..." rows="6" name="comment" required></textarea> </div> </div> </div> <div class="panel-footer" style="margin-bottom:-14px;"> <input type="submit" class="btn btn-success" value="Send"/> <!--<span class="glyphicon glyphicon-ok"></span>--> <input type="reset" class="btn btn-danger" value="Clear" /> <!--<span class="glyphicon glyphicon-remove"></span>--> <button style="float: right;" type="button" class="btn btn-default btn-close" data-dismiss="modal">Close</button> </div> </div> </div> </div> </div> <div class="modal fade" id="vote" tabindex="-1" role="dialog" aria-labelledby="voteLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="panel panel-primary"> <div class="panel-heading"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="panel-title" id="voteLabel"><span class="glyphicon glyphicon-arrow-right"></span> How is My Site?</h4> </div> <div class="modal-body"> <ul class="list-group"> <li class="list-group-item"> <div class="radio"> <label> <input type="radio" name="optionsRadios"> Excellent </label> </div> </li> <li class="list-group-item"> <div class="radio"> <label> <input type="radio" name="optionsRadios"> Good </label> </div> </li> <li class="list-group-item"> <div class="radio"> <label> <input type="radio" name="optionsRadios"> Can Be Improved </label> </div> </li> <li class="list-group-item"> <div class="radio"> <label> <input type="radio" name="optionsRadios"> Bad </label> </div> </li> <li class="list-group-item"> <div class="radio"> <label> <input type="radio" name="optionsRadios"> No Comment </label> </div> </li> </ul> </div> <div class="modal-footer"> <button type="button" class="btn btn-success btn-vote">Vote!</button> <span class="btn btn-primary dropdown-results btn-results" data-for=".results">View Results</span> <button type="button" class="btn btn-default btn-close" data-dismiss="modal">Close</button> </div> <div class="row vote-results results"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="margin-left: 5px;"> Excellent <div class="progress"> <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%"> <span class="sr-only">40% Excellent (success)</span> </div> </div> Good <div class="progress"> <div class="progress-bar progress-bar-primary" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%"> <span class="sr-only">20% Good (primary)</span> </div> </div> Can Be Improved <div class="progress"> <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100" style="width: 25%"> <span class="sr-only">60% Can Be Improved (warning)</span> </div> </div> bad <div class="progress"> <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100" style="width: 10%"> <span class="sr-only">80% Bad (danger)</span> </div> </div> No Comment <div class="progress"> <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="5" aria-valuemin="0" aria-valuemax="100" style="width: 5%"> <span class="sr-only">80% No Comment (info)</span> </div> </div> Overall <div class="progress"> <div class="progress-bar progress-bar-success" style="width: 20%"> <span class="sr-only">35% Complete (success)</span> </div> <div class="progress-bar progress-bar-primary" style="width: 40%"> <span class="sr-only">20% Complete (primary)</span> </div> <div class="progress-bar progress-bar-warning" style="width: 25%"> <span class="sr-only">10% Complete (warning)</span> </div> <div class="progress-bar progress-bar-danger" style="width: 10%"> <span class="sr-only">10% Complete (danger)</span> </div> <div class="progress-bar progress-bar-info" style="width: 5%"> <span class="sr-only">10% Complete (info)</span> </div> </div> </div> </div> </div> </div> </div> </div> <p class="text-right">Thanks to Cyruxx and BhaumikPatel</p> </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: