title: Triggering a Jquery event from a CSS toggle button
body: <p>I am looking for the right way to modify the trigger to a jquery function that is currently toggled between 2 states from an 'empty' text hyperlink, and replace the text with with a css toggle button as the trigger. I have the new button working fine visually, but little idea of how to adapt the hyperlink to be triggered by the new button. I am guessing some sort of 'onClick' maybe, but I'm not that experienced. Here's what I have:</p>
  
  <p>First the existing HTML (the call toggles audio on and off each time it's clicked).</p>
  
  <pre><code>&lt;a href="#" class="tubular-mute"&gt;Mute&lt;/a&gt;
  </code></pre>
  
  <p>And here's my (visually) working HTML that draws a more attractive toggle button rather than just using the word 'Mute' above:</p>
  
  <pre><code>&lt;label class="switch"&gt;
          &lt;input class="switch-input" type="checkbox" /&gt;
          &lt;span class="switch-label" data-on="AUDIO" data-off="MUTE"&gt;&lt;/span&gt;
          &lt;span class="switch-handle"&gt;&lt;/span&gt;
  &lt;/label&gt;
  </code></pre>
  
  <p>Just to note that 'switch-handle' is simply the part that draws a moving switch in 2 positions depending on it's on/off state. I experimented removing it and found the rest of the switch still fuctioned (changing colour for example) but no longer had it's animated element.</p>
  
  <p>So how do I activate the Jquery part that deals with this? If it helps, here's what looks like the relevant portion, although I've no idea what the chain of events are to invoke it:</p>
  
  <pre><code>var defaults = {
          playButtonClass: 'tubular-play',
          pauseButtonClass: 'tubular-pause',
          muteButtonClass: 'tubular-mute',
  </code></pre>
  
  <p>Any thoughts?  Thank you for your consideration.</p>
  
  <p>Edit:
  I've since found that by adding the  class 'tubular-mute' to any of the classes involved in the CSS button, I can toggle the mute on and off. Unfortunately the side effect is that it kills the css toggle animation from working. It's as if the event can only be recognised by either the css or the Jquery.</p>