12.Scroll when enter the page

Method 1: Scroll to pixel

1. Add the code to page

Copy this code:

let url_string = window.location.href
let url = new URL(url_string);
let distance = url.searchParams.get("scroll");
window.scroll(0, distance)

Paste the above code to the Builder: Builder -> HTML -> Custom code JavaScript

2. Access the page and add the code

Add this code after the page link

/?scroll=1234

1234 is the distance you want to scroll when entering the page

For example: the original page is: https://www.landingpagemienphi.com

Add the code to: https://www.landingpagemienphi.com/?scroll=1234

Method 2: Scroll to the section

1. Get the ID section

2. Access the page and add the ID section

Users paste the ID section after the landing page link on your browser

In which: w-1k6saftk is the ID section

The original site: https://www.landingpage.click/food

After adding code: https://www.landingpage.click/food/#w-1k6saftk

Last updated