As you can see I created a btn-group
<div class="row">
<div class="col-lg-12">
<div class="btn-group inline">
<a href="#" class="btn btn-success" >Offline</a>
<a class="btn btn-info" id="print_map_btn">Print</a>
<a href="#" class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
<ul class="dropdown-menu pull-right" id="print_options">
<li data-option="complete_map"><a href="#">Complete</a></li>
<li data-option="map_sector"><a href="#">Act</a></li>
</ul>
</div>
</div>
</div>
When you click on the Arrow on the right, the dropdown opens
I would like to achieve that when someone clicks on the Print button on the left, the dropdown opens.
I tried to achieve it like this:
var print_btn = $('#print_map_btn');
print_btn.click(function(){
$('.btn-group').addClass('open');
});
But it won't work: http://jsfiddle.net/52VtD/13893/
How can I fix it? Thanks
data-toggle="dropdown"to the trigger. Like this jsfiddle.net/52VtD/13895