When I click on a dropdown labeled 'View Capacities', the label changes to 'Hide Capacities'. I am attempting to make it change back to the original label when it is double clicked (when toggle closes) or when the user clicks elsewhere in the window.
My HTML code looks like this:
//JQUERY:
$('.FullLengthDropdown').focus(function(){
$('.ViewCapacitiesTxt').text("HIDE CAPACITIES");
});
<button class="FullLengthDropdown btn btn-primary dropdown-toggle " type="button" data-toggle="dropdown">
<div>
<span class="ViewCapacitiesTxt">VIEW CAPACITIES</span>
</div>
</button>
<table class="dropdown-menu">
<tr>
<th>SPACE</th>
<th>RECEPTION</th>
<th>THEATRE</th>
<th>BANQUETING</th>
<th>CABARET</th>
<th>BOARDROOM</th>
</tr>
</table>