title: JQuery - Hiding a checkbox and text
body: <p>I'm trying to hide an asp:CheckBox control depending on whether or not a certain link is visible on the screen. The checkbox has a text attribute = "hello". I'm trying to do this in JQuery.</p>
  
  <p>I currently have the following:</p>
  
  <pre><code>$(document).ready(function(){
  
      hideCheckboxButtonIfLinkExists();
  
      }  );   
  
      function hideCheckboxButtonIfLinkExists() {
  
          var $myCheckBox = $('#&lt;%= ckMyCheckBox.ClientID %&gt;');
          var $myLink = $('#&lt;%= lkMyLink.ClientID %&gt;');
  
          if($myLink .is(':visible'))
          {
              $myCheckBox .show();                               
          } 
          else
          {
              $myCheckBox .hide();
          }    
  
      }  
  </code></pre>
  
  <p>When I open the page if the link is not visible then the checkbox is not visible, however the checkbox text attribute "hello" is visible. </p>
  
  <p>How can I hide this also?</p>
  
  <p>Thanks in advance for your help.</p>