function edgtfScrollToContent() {
        if (edgtf.body.hasClass('edgtf-scroll-to-content') && !edgtf.htmlEl.hasClass('touch')) {
         	var sliderHolder = $('.edgtf-slider'),
         		revSlider = sliderHolder.find('.rev_slider'),
         		sliderHolderHeight,
         		sliderHolderOffset,
         		sliderArea,
         		scrollTarget,
         		readyToScroll = false,
         		pageJump = false,
         		wheelDownwards = false;

           	//update slider height and offset
            var updateCoordinates = function() {
				sliderHolderHeight = sliderHolder.height();
				sliderHolderOffset = sliderHolder.offset().top;
				sliderArea = sliderHolderHeight - sliderHolderOffset;
				scrollTarget = sliderHolderHeight + sliderHolderOffset;
            }

            //wheel direction get
            var getSliderWheelDirection = function(e) {
             	if (e.deltaY < 0) {
                    wheelDownwards = true; //downwards
                } else {
                    wheelDownwards = false; //upwards
                }
            }

            var edgtfSliderWheelHandler = function(e) {
             	if (edgtf.scroll < sliderArea) {
             		if (wheelDownwards) {
	             		edgtfDisableScroll();

	             		if (!pageJump) {
	             			pageJump = true;

             			    $('html, body').stop().animate({
             			    	scrollTop: scrollTarget
             			    }, 1000, 'easeInOutQuint', function() {
             			    	pageJump = false;
             			    	edgtfEnableScroll();
             			    });
	             		}
             		}
             	}
            }

            //init
			updateCoordinates();
			sliderHolder.on('mousewheel', function(e){
				getSliderWheelDirection(e);
			});

			document.querySelector('.edgtf-slider').addEventListener('wheel', edgtfSliderWheelHandler, {passive: true});

            if (revSlider.length) {
                revSlider.on('bind', 'revolution.slide.onchange', function(e, data) {
                 	readyToScroll = true;
            	});
            } else {
                $(window).load(function(){
                    readyToScroll = true;
                });   
           	}

           	$(window).resize(function(){
           		setTimeout(function(){
					updateCoordinates();
           		}, 100);
           	});
        }
    }
/*
    * Slide to content on scroll - one scroll to page content
    */
Slide to content on scroll - one scroll to page content
Slide to content on scroll - one scroll to page content
function edgtfScrollToContent() {
        if (edgtf.body.hasClass('edgtf-scroll-to-content') && !edgtf.htmlEl.hasClass('touch')) {
         	var sliderHolder = $('.edgtf-slider'),
         		revSlider = sliderHolder.find('.rev_slider'),
         		sliderHolderHeight,
         		sliderHolderOffset,
         		sliderArea,
         		scrollTarget,
         		readyToScroll = false,
         		pageJump = false,
         		wheelDownwards = false;
            var updateCoordinates = function() {
				sliderHolderHeight = sliderHolder.height();
				sliderHolderOffset = sliderHolder.offset().top;
				sliderArea = sliderHolderHeight - sliderHolderOffset;
				scrollTarget = sliderHolderHeight + sliderHolderOffset;
            }
            var getSliderWheelDirection = function(e) {
             	if (e.deltaY < 0) {
                    wheelDownwards = true; 
                } else {
                    wheelDownwards = false; 
                }
            }
            var edgtfSliderWheelHandler = function(e) {
             	if (edgtf.scroll < sliderArea) {
             		if (wheelDownwards) {
	             		edgtfDisableScroll();
	             		if (!pageJump) {
	             			pageJump = true;
             			    $('html, body').stop().animate({
             			    	scrollTop: scrollTarget
             			    }, 1000, 'easeInOutQuint', function() {
             			    	pageJump = false;
             			    	edgtfEnableScroll();
             			    });
	             		}
             		}
             	}
            }
			updateCoordinates();
			sliderHolder.on('mousewheel', function(e){
				getSliderWheelDirection(e);
			});
			document.querySelector('.edgtf-slider').addEventListener('wheel', edgtfSliderWheelHandler, {passive: true});
            if (revSlider.length) {
                revSlider.on('bind', 'revolution.slide.onchange', function(e, data) {
                 	readyToScroll = true;
            	});
            } else {
                $(window).load(function(){
                    readyToScroll = true;
                });   
           	}
           	$(window).resize(function(){
           		setTimeout(function(){
					updateCoordinates();
           		}, 100);
           	});
        }
    }
function edgtfScrollToContent ( ) { if ( edgtf . body . hasClass ( 'edgtf-scroll-to-content' ) && ! edgtf . htmlEl . hasClass ( 'touch' ) ) { var sliderHolder = $ ( '.edgtf-slider' ) , revSlider = sliderHolder . find ( '.rev_slider' ) , sliderHolderHeight , sliderHolderOffset , sliderArea , scrollTarget , readyToScroll = false , pageJump = false , wheelDownwards = false ; var updateCoordinates = function ( ) { sliderHolderHeight = sliderHolder . height ( ) ; sliderHolderOffset = sliderHolder . offset ( ) . top ; sliderArea = sliderHolderHeight - sliderHolderOffset ; scrollTarget = sliderHolderHeight + sliderHolderOffset ; } var getSliderWheelDirection = function ( e ) { if ( e . deltaY < 0 ) { wheelDownwards = true ; } else { wheelDownwards = false ; } } var edgtfSliderWheelHandler = function ( e ) { if ( edgtf . scroll < sliderArea ) { if ( wheelDownwards ) { edgtfDisableScroll ( ) ; if ( ! pageJump ) { pageJump = true ; $ ( 'html, body' ) . stop ( ) . animate ( { scrollTop : scrollTarget } , 1000 , 'easeInOutQuint' , function ( ) { pageJump = false ; edgtfEnableScroll ( ) ; } ) ; } } } } updateCoordinates ( ) ; sliderHolder . on ( 'mousewheel' , function ( e ) { getSliderWheelDirection ( e ) ; } ) ; document . querySelector ( '.edgtf-slider' ) . addEventListener ( 'wheel' , edgtfSliderWheelHandler , { passive : true } ) ; if ( revSlider . length ) { revSlider . on ( 'bind' , 'revolution.slide.onchange' , function ( e , data ) { readyToScroll = true ; } ) ; } else { $ ( window ) . load ( function ( ) { readyToScroll = true ; } ) ; } $ ( window ) . resize ( function ( ) { setTimeout ( function ( ) { updateCoordinates ( ) ; } , 100 ) ; } ) ; } }
Slide to content on scroll - one scroll to page content
Slide to content on scroll - one scroll to page content
//update slider height and offset //wheel direction get //downwards //upwards //init