title: How to get the clicked element in Bootstrap collapse event?
body: <p>I am having trouble to find the clicked anchor element in the collapse event using Bootstrap 3.3.4.:</p>
  
  <pre><code>$('.collapse').on('show.bs.collapse', function (e) {
      // Get clicked element that initiated the collapse...
  });
  </code></pre>
  
  <p>I need this because I'd like to prevent collapsing if the clicked element has a certain data attribute. Another option would be to hook in by using <code>.on('click', function())</code>, however there are other events that occur on click that need to run so this seems a no-go to me. Searching in the DOM for the closest anchor or something similar won't work as well since there are multiple anchors next to eachother.</p>