Skip to content

Footer won't load #544

Open
Open
@niftyphil

Description

@niftyphil

I wanted to have a very subtle entrance effect on all elements, and this solved it perfectly. One minor issue I have though, is that it only loads the footer about 25% of the time. The rest of the time the newsletter block in my footer just doesn't load. Is there any way I can exclude a single element, rather than having to manually add each element type on a pretty big site? I currently have it set to affect .sqs-block-content, .Index-gallery-item-content, and would like to exclude .newsletter-block

As it stands, I have this in the header code:

<script src="https://unpkg.com/scrollreveal@4"></script>
<script>
window.sr = ScrollReveal();
</script>
<style>
/*ensure elements load hidden before scrollreveal runs */
  html.sr body:not(.sqs-edit-mode).sqs-block-content, html.sr body:not(.sqs-edit-mode).Index-gallery-item-content {
    visibility: hidden;
  }
</style>

And this in the footer:

<script>
  sr.reveal ('.sqs-block-content, .Index-gallery-item-content, .Index-gallery-item-image ', {
    origin: 'bottom',
    distance: '50px',
    duration: 1000,
    easing: 'ease',
    mobile: true,
    reset: false,
    viewFactor: .2,
  });
</script>

Can anybody help with this? It's probably a pretty simple fix but I'm still fairly new to some aspects of coding

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions