"select city"
Bootstrap 3.3.0 Snippet by pasystem

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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"> <div class="col-md-4"> <select name="city" id="city" class="form-control" readonly> <option>Almaty</option> </select> <div id="select" style="position:absolute; left:0; right:0; top:0; bottom:0;"></div> </div> </div> <!-- Modal --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">Выбор региона</h4> </div> <div class="modal-body"> <div class="row"> <div class="col-md-12"> <h4 class="modal-title" id="myModalLabel">Недавно выбранные</h4> </div> </div> <div class="row"> <div class="col-md-4 city-list"> <ul> <li><a href="#" class="btn btn-primary">Almaty</a></li> </ul> </div> <div class="col-md-4 city-list"> <ul> <li><a href="#">Almaty</a></li> </ul> </div> <div class="col-md-4 city-list"> <ul> <li><a href="#">Almaty</a></li> </ul> </div> </div> <div class="row"> <div class="col-md-12"> <h4 class="modal-title" id="myModalLabel">или выберите другой</h4> </div> </div> <div class="row"> <div class="col-md-4 city-list"> <ul> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> </ul> </div> <div class="col-md-4 city-list"> <ul> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> </ul> </div> <div class="col-md-4 city-list"> <ul> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> <li><a href="#">Almaty</a></li> </ul> </div> </div> </div> </div> </div> </div> </div>
.container { margin-top: 20px; } select.form-control[readonly] { background-color: #fff; } ul { list-style: none; padding-left: 10px; } .city-list a { color: #4e575d; } .city-list a.btn-primary { border-radius: 20px; color: #ffffff; }
$(document).on('click','#select',function(){ //Launch the modal on click event $('#myModal').modal(); });

Related: See More


Questions / Comments: