So here is the code to a simple background parallax that i would like on my website.
$(window).scroll(function (e) {
parallax();
});
function parallax() {
var scrolled = $(window).scrollTop();
$(‘.pizza-hero’).css(‘top’, -(scrolled * 0.2) + ‘px’);
}
Where would i put this, in the header box of the custom code or the body box of the custom code? Here is the code pen of it working Here