creativetimofficial / ct-rubik

2 stars 2 forks source link

Parallax problem in latest versions of Chrome (61+) #2

Open alexandru-paduraru opened 6 years ago

alexandru-paduraru commented 6 years ago

To fix the problem with the parallax, caused by the latest Chrome update, please go to assets/js/rubick.js and search the function checkScrollForParallax, it will be around line 300 then replace the whole body of the function with this code:

no_of_elements = 0;
$('.parallax').each(function() {
    var $elem = $(this);

    var parent_top = $elem.offset().top;
    var window_bottom = $(window).scrollTop();
    var $image = $elem.children('img');

    oVal = ((window_bottom - parent_top) / 3);
    $image.css('transform','translate3d(0px, ' + oVal + 'px, 0px)');
});

Then the problem will be fixed. We will do this update in the next release.

Best, Alex

cliveportman commented 4 years ago

Hi. I've just purchased this in Dec 29 and this fix hasn't made it into my release?

dragosct commented 4 years ago

Hi, @cliveportman! Thank you for using our products. Can you put this code into your project to fix the parallax or if you can't do it, we can help you.

Regards, Dragos