title: Disabling User Defined Function Jquery
body: <p>I have a function that navigates to another frame of a horzonital silder..</p>
  
  <pre><code>function goto(id, t) {
      //animate to the div id.
      $(".HozSlidercontentbox-wrapper").animate({ "left": -($(id).position().left) }, 600);
  
      // remove "active" class from all links inside #nav
      $('#HozSlidernav a').removeClass('active');
  
      // add active class to the current link
      $(t).addClass('active');
  }
  </code></pre>
  
  <p>I want to be able to diable this functionality when the checkbox "Clone" is checked..</p>
  
  <pre><code>&lt;li class="HozSlider_li"&gt;&lt;a id="hypHozSliderMobile" class="HozSlider_a" href="#" onclick="goto('#HozSlider_mobile', this); return false"&gt;Mobile&lt;/a&gt;&lt;/li&gt;
  
  &lt;li class="HozSlider_li"&gt;&lt;label&gt;&lt;input type="checkbox" onclick="DisableGoto()"&gt;&lt;span style="color:#0073BF;font-weight:bold"&gt;Clone&lt;/span&gt;&lt;/label&gt;&lt;/li&gt;
  </code></pre>
  
  <p>How do I write the function DisableGoto so when engaged the onClick of hypHozSliderMobile wont do anything (its disabled) ?</p>