"Messenger Panel"
Bootstrap 3.1.0 Snippet by ytre

<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"> <div class="col-xs-8 col-xs-offset-2"> <div class="input-group"> <div class="input-group-btn messenger-panel"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <span id="messenger_c">Komunikator internetowy</span> <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="#skype">Skype</a></li> <li><a href="#yahoo">Yahoo</a></li> </ul> </div> <input type="hidden" name="messenger_param" value="" id="messenger_param"> <input type="text" class="form-control" name="messenger_id" placeholder=""> </div> </div> </div> </div>
body{ margin-top:20px; } a:focus{ outline: none; }
$(document).ready(function(e){ $('.messenger-panel .dropdown-menu').find('a').click(function(e) { e.preventDefault(); var param = $(this).attr("href").replace("#",""); var concept = $(this).text(); $('.messenger-panel span#messenger_c').text(concept); $('.input-group #messenger_param').val(param); }); });

Related: See More


Questions / Comments: