title: How to toggle checkbox states
body: <p>I can't uncheck a checkbox after I checked it (all via JS/Jquery).</p>
  
  <p>Code:  </p>
  
  <pre><code>//Works perfect
  function showL(labelObj)
  {   
      var cb = $(labelObj).prev()[0]; 
      $(cb).prop('checked', true);    
  }  
  
  //Does NOT work
  function hideL(labelObj)
  {
      var cb = $(labelObj).next()[0];
      //$(cb).attr('checked', false);
      $(cb).prop('checked', false);
  }  
  </code></pre>
  
  <p><strong>update</strong></p>
  
  <p>It's the same object in both functions:<br>
  <a href="https://i.stack.imgur.com/kjpRC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kjpRC.jpg" alt="enter image description here"></a></p>