Add event to body only one time
<p>I'm trying to change the follow line to add the handler only one time</p>

<pre><code>$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
})
</code></pre>

<p>My idea is to add an attribute to the element after add the bind for the first time and, check if the element has the attribute before adding the bind.</p>

<p>To set the attribute is easy:</p>

<pre><code>$('body').find('[data-toggle=collapse]').attr('data-loaded',"true");
</code></pre>

<p>But to change the selector to check if the attribute is not set is the hard part. </p>

<p>I tried something like:</p>

<pre><code>$('body').on('click.collapse.data-api', '[data-toggle=collapse] :not([data-loaded])',function ( e ) {
})
</code></pre>

<p>but it doesn't work...</p>

<p>Can anyone help?</p>

<p>Thanks.</p>
