From Top

<script>
jQuery(document).ready(function($) {
	
	
	<?php $make_parallax     = get_sub_field('make_parallax');  ?>
	<?php if(!empty($make_parallax)) { ?> 
	
	    $window            = $(window);		    
	    var isb_distance   = 0;
	    var has_fired      = false;
	    var multiplier     = 1 - 0.5;
		
		$window.scroll(function() {
			
		    isb_distance = $('#picture_title_text_4_block_<?php echo $mod_count; ?>').offset().top;
	
		    if ( $window.scrollTop() >= isb_distance ) {					    
			    var this_distance = ($window.scrollTop() - isb_distance) * multiplier; 				    
		        $('#picture_title_text_4_block_<?php echo $mod_count; ?>').css('background-position','0px '+this_distance+'px');			        
		    }else{
		        $('#picture_title_text_4_block_<?php echo $mod_count; ?>').css('background-position','0px 0px');
		    }
		    
		});
	
	<?php }  ?>
		
		
});
</script>
Comments