Wix Tutorial - Auto scroll page, using Wix Code
This code lets you automatically scroll to the next strip.
Elements:
Elements:
-
Strip 1: #ColumnStrip1 | Add onViewportEntert event in the Properties Panel
-
Strip 2: #ColumnStrip2 | Add onViewportEntert event in the Properties Panel
-
Strip 3: #ColumnStrip3 | Add onViewportEntert event in the Properties Panel
-
Strip 4: #ColumnStrip4 | Add onViewportEntert event in the Properties Panel
-
Strip 5: #ColumnStrip5 | Add onViewportEntert event in the Properties Panel
-
Strip 6: #ColumnStrip6 | Add onViewportEntert event in the Properties Panel
Wix Code:
export function columnStrip1_viewportEnter(event, $w) {
$w("#columnStrip1").scrollTo();
}
export function columnStrip2_viewportEnter(event, $w) {
$w("#columnStrip2").scrollTo();
}
export function columnStrip3_viewportEnter(event, $w) {
$w("#columnStrip3").scrollTo();
}
export function columnStrip4_viewportEnter(event, $w) {
$w("#columnStrip4").scrollTo();
}
export function columnStrip5_viewportEnter(event, $w) {
$w("#columnStrip5").scrollTo();
}
export function columnStrip6_viewportEnter(event, $w) {
$w("#columnStrip6").scrollTo();
}
Demo:
see how this page functions. It has 6 strips, name columnStrip1, columnStrip2, columnStrip3, columnStrip4, columnStrip5, and columnStrip6,