title: Bootstrap "hidden.bs.modal" fired but handler won't work
body: <p>I have registered this short handler to my modal dialog and i want a  is stop playing when i close the dialog:</p>
  <pre><code>window.Js = {
      // hidden.bs.registration
      registerCloseModalHandler: function (modalId) {
          $(modalId).on(&quot;hidden.bs.modal&quot;,
              function (e) {
                  $(&quot;#wavAduioPlayer&quot;).src = &quot;&quot;;  // &lt;-- BREAKPOINT
              });
      },
  
      // Button onclick event works
      stopPlayer: function() {
          $(&quot;#wavAduioPlayer&quot;).src = &quot;&quot;;
      };
  };
  </code></pre>
  <p>The registration of <code>registerCloseModalHandler</code> is fine and is set (Checked with DevTools)</p>
  <p>The  tag looks like:</p>
  <pre><code>&lt;audio id=&quot;#wavAduioPlayer&quot; src=&quot;SomeStreamUrl&quot; preload=&quot;none&quot; controls&gt;
  </code></pre>
  <p>When i close the dialog the execution hits the breakpoint but the <code>src</code> is not set to <code>&quot;&quot;</code>.</p>
  <p>I have check the functionality with a close <code>&lt;button onclick=&quot;Js.stopPlayer()&quot; data-dismiss=&quot;modal&quot;&gt;&amp;times;&lt;/button&gt;</code>. And this works as expected.</p>