When window has been scrolled X pixels left, scroll up JQuery
<p>Im trying to make a sort of parrallax site where, when my window has scrolle say, 1000 pixels right, stop scrolling right, scroll up 300 pixels, then continue to scroll right. </p>

<p>Is this possible with jQuery? </p>

<p>Im using the below to set my widths and scroll right...</p>

<pre><code>    $(document).ready(function(){

         var height = $(window).height();
         var width = $(window).width();

         // Make each section 100% height and width 
         $('section').each(function(){
             $(this).css({'width' : width, 'height' : height});
         });

         // Calculate and set body width
         var sectionWidth = $('section').width();
         var entireWidth = sectionWidth * 6;
         $('body').css({'width' : entireWidth});

         // Scroll Horizontally 
         $(function() {
             $("html, body").mousewheel(function(event, delta) {
                 this.scrollLeft -= (delta * 30);
                 event.preventDefault();
             });
         });

         // After 3rd section, move up * height
         $(function() {

         });

    });
</code></pre>

<p>Ive written this to say when I get too X I need to move up only Im unsure where to go now...</p>

<pre><code>var isVisible = false;
         $(window).scroll(function(){
             var shouldBeVisible = $(window).scrollLeft()&gt;sectionWidth * 2;
             if (shouldBeVisible &amp;&amp; !isVisible) {
                  isVisible = true;
                  alert('foo');
             } else if (isVisible &amp;&amp; !shouldBeVisible) {
                  isVisible = false;
                   alert('bar');
            }
        });
</code></pre>
