title: I want modal to appear only once
body: <p>
  I using jquery simplemodal.js with newsletter subscription regestration and I need to make it scroll triggered, appear not on every site and only when we first time visit website, disappear hen we cancel it or submit, and not appear any more.
  </p>
  
  <pre><code>if (window.location.href.indexOf('cruises') == -1){
      if (!newsletter) {
          var name = 'scroll_popup';
          if (sessionStorage[name] != 1 &amp;&amp; window[name] != 1) {
              $(window).on('scroll', function() {
                  var y_scroll = window.pageYOffset;
                  var scroll_test = 150; 
  
                      if(y_scroll &gt; scroll_test) {
                          $('#my_popup').modal({closeClass: 'modal-close'});
                      }
              });
              cancelPopup();
          }
      }
  }
  
  function cancelPopup() {
      var name = 'scroll_popup';
      try {
          sessionStorage.setItem(name, 1);
      } catch(e) {
          window[name] = 1;
      }
  }
  
  $(document).on('click', '.js-cancel_popup', function(e) {
      cancelPopup();
  });
  </code></pre>
  
  <p>
  when we first time coming to website and we click submit or cancel modal disappear and not appear when we scrolling</p>
  
  <p>
  after cancel modal appear when we scrolling</p>