fix: never copy code, not even your own code

This commit is contained in:
Harsh Khandeparkar 2020-06-29 11:29:29 +05:30 committed by GitHub
parent 1595031250
commit c49c681931
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ const parallaxOffset = 20;
$(window).on('scroll', () => {
const movedBy = window.scrollY;
if ($(window).height() - elem.getBoundingClientRect().top >= parallaxOffset) {
if ($(window).height() - parallax.getBoundingClientRect().top >= parallaxOffset) {
$('.parallax').each((i, parallax) => {
$(parallax).find('.parallax-layer').each((i, layer) => {
const depth = $(layer).attr('data-depth-factor') || depthFactor; // dynamically get depthFactor