Parallax image starting point

Permalink
Hello,

I'm building a site that has a parallax image on the homepage, but I can't seem to figure out how to start the background-position where I want to.

When the page loads, and you're at the very top, the background-position is:
background-position: 50% 0;


I want it to start at:
background-position: 50% 139px;


My js for this is:
$(document).ready(function(){
   $window = $(window);
   $('section[data-type="background"]').each(function(){
     var $scroll = $(this);
      $(window).scroll(function() {                           
        var yPos = -($window.scrollTop() / $scroll.data('speed')); 
        var coords = '50% '+ yPos + 'px';
        $scroll.css({ backgroundPosition: coords });    
      }); 
   }); 
});


Any help is much appreciated!

Thanks
Kurtopsy

Kurtopsy
 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.