Doesn't work with views_fluidgrid

Created on 5 August 2015, over 9 years ago
Updated 26 November 2024, 22 days ago

Great module and I enjoy it a lot until I found a bug related to this module and views_fluidgrid views_load_more.

If the div element intended to do parallax comes after a views_fluidgrid element (ajax loading) => then it doesn't work. Because the value of $this.offset().top; and $window.scrollTop() are too far away (in my case > 6000) => which cause the background image doesn't shown at all.

To reproduce it:
- Enable two module parallax_bg and views_fluidgrid( https://www.drupal.org/project/views_fluidgrid β†’ ) and views_load_more ( https://www.drupal.org/project/views_load_more β†’ )
- Create a view block display that is using views_fluidgrid, enalbe views load more link also
- Place fluidgrid block display in row1 (from panel)
- Row2 (from panel) below row1, we do parallax for its background image.
It will not work and inspect row2 element while the mouse is scrolling we will see that the style="background-position: 0px XXXXpx;"
Since XXXX is >5000 for my case, I can't see the parallax effect on the background image.
This number is come from the formula in the code as:
Math.round($this.offset().top - $window.scrollTop()) * speedFactor

Further check I do see the $this.offset().top seem to take into account of part of element of row1 that will be loaded by ajax while $window.scrollTop() doesn't.

Any fix is appreciated.

πŸ› Bug report
Status

Closed: outdated

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States truyenle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    I'm closing it because the issue was created a long time ago without any further steps.

    if you still need it then raise a new one.
    thanks

Production build 0.71.5 2024