I'm currently working on a Twitter Bootstrap 3.1.1 app that features a nested Bootstrap structure.
<ul class="goods-categories goods-list">
<div id="point" data-toggle="collapse" data-target="#all" class="point blue m-top">All products</div>
<div id="all" class="collapse">
<li><a href="/products?category_id=11">Paper Products</a></li>
<li><a href="/products?category_id=14">Notepads, Dispensers</a></li>
<li><a href="/products?category_id=13">Notebooks, Journals</a></li>
</div>
</ul>
I am trying to figure out how to implement a feature where the collapse toggles closed when a user clicks outside of the #all
and its children. Any ideas on how to achieve this?