scroll up increment jquery code example

Example 1: jquery on scroll x pixels

$(document).scroll(function() {
               var value=$(document).scrollTop();

                if ( value >= 1000 ) { /*do this*/; return;}
                if ( value >= 500 ) { /*do this*/; return;}
                if ( value >= 150 ) { /*do this*/; return;}
                if ( value >= 30 ) { /*do this*/; return;}
                /* else */
                /*do this*/
            });

Example 2: jquery on scroll x pixels

$(document).scroll(function() {
           var value=$(document).scrollTop();/* <== here*/

            if ( value >= 1000 ) {
            } else if ( value >= 500 ) {
            } else {
            }
        });