title: How to toggle an element that uses scroll (function)?
body: <p>I have an element that is set to disappear when the user scrolls down in the browser window. I also want that element to toggle its visibility when another element is clicked.</p>
  
  <p>Here's what I have, but the toggle visible/invisible does not work:</p>
  
  <pre><code>jQuery(document).ready(function() {
      $(window).scroll(function() {
          $(".product-down-scroll").css("opacity", 1 - $(window).scrollTop() / 250);
      });
  
      $('.pricing-tab').click(function() {
          $('.product-down-scroll').toggle();
      });
  });
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>&lt;div class="pricing-accordion"&gt;
      &lt;div class="pricing-tab"&gt;
          &lt;input id="tab" type="checkbox" name="tabs"&gt;
          &lt;label for="tab"&gt;PRICING&lt;/label&gt;
          &lt;div class="tab-content"&gt;
              &lt;p&gt;Lorem ipsum dolor si amet&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How to accomplish that?</p>