"Get value dropdown to input bootstrap input group"
Bootstrap 3.0.0 Snippet by phainv

<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 ----------> <br/> <br/> <div class="container"> <div class="input-group"> <input type="text" class="form-control" aria-label="..."> <div class="input-group-btn"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Action <span class="caret"></span></button> <ul class="dropdown-menu dropdown-menu-right"> <li><a>USD</a></li> <li><a>VND</a></li> </ul> </div><!-- /btn-group --> </div><!-- /input-group --> </div>
$(document).on('click', '.dropdown-menu li a', function(e) { var selText = $(this).text(); $(this).closest('.input-group').find('input').val(selText) });

Related: See More


Questions / Comments: