# Scroll Snap Workaround?

**URL:** <https://forum.wixstudio.com/t/scroll-snap-workaround/56369>\
**Category:** Ask the community\
**Tags:** wix-studio, question\
**Created:** [February 14, 2024, 1:35am UTC](https://forum.wixstudio.com/t/scroll-snap-workaround/56369 "2024-02-14T01:35:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blow\_Corp](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/blow_corp/32/83301_2.png) [@Blow\_Corp](https://forum.wixstudio.com/u/Blow_Corp)\
**Post date:** [February 14, 2024, 1:35am UTC](https://forum.wixstudio.com/t/scroll-snap-workaround/56369/1 "2024-02-14T01:35:11Z")

</div>

Hello there,  
New to Wix Studio and looking for a coded (or actually better, not coded if possible) workaround to allow elements to trigger a Scroll Snap. The site I’m designing has 3 key features in one section which need to be snapped to in scroll in order to align sticky items with non-sticky ones.

Been using the method described in this video,

[![](https://us1.discourse-cdn.com/wix/original/3X/4/d/4d5b8cbefe85b0141cbff6573bb0ead14aabb127.jpeg "Full Screen Sections Scroll Snap | Editor X") ](https://www.youtube.com/watch?v=DPBIviTtbC8)

but this has since stopped working.

It’s a very basic coding once your elements are set up not to trigger two or more events at once and it did work fine using a simple “trigger” element to initiate ScrollTo to a “focus” element.  
E.g.  
export function trigger\_viewportEnter(event) {  
$w(‘#focus’).scrollTo();  
}

Has anyone found a way to do this? In Resources, the Scroll Snap is a feature which is requested (please vote for it!) but has not been added yet.

Thank you!

---

<div class="post-metadata">

**Author:** ![Iyar\_Dalva](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/iyar_dalva/32/108221_2.png) [@Iyar\_Dalva](https://forum.wixstudio.com/u/Iyar_Dalva)\
**Post date:** [May 31, 2025, 6:51pm UTC](https://forum.wixstudio.com/t/scroll-snap-workaround/56369/3 "2025-05-31T18:51:37Z")

</div>

Hi !  
I’m trying to do the same thing with no success..

The tutorial is about Editor X, but i’m using Wix Studio. I’m not sure how they’re different when it comes to code…

Here’s my try:

```javascript
$w.onReady(function () {
    $w('#contactSection').onViewportEnter(() => {
            console.log("Viewport entered");
            $w('#contactSection').scrollTo();
    })
});

```

The log says the trigger is fired twice every time the section enters the screen. What could be the reason for that?

What am I missing here?
