title: Disable Fancybox Pop-Up With Cookies
body: <p>I have a Fancybox set on a delay to pop up on any page of my Wordpress, I'm looking to have it become disabled after a user submits something in the provided input or have it not show up for a given amount of time if the user clicks on the bypass link. I've tried a few scripts found around this site but nothing seemed to work, here's what I currently have set in place.</p>
  
  <pre><code>function openFancybox() {
          setTimeout( function() {$('.pop').trigger('click'); },20000);
      }
      $(document).ready(function() {
          var visited = $.cookie('visited');
          if (visited == 'yes') {
              return false;
          } else {
              openFancybox();
          }
          $.cookie('visited', 'yes', { expires: 7 });
          $('.pop').fancybox();
      });
  </code></pre>