Have you put it inside $w.onReady() ?
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Page Ready | 5 | 704 | February 9, 2019 | |
| $w(...).onReady is not a function | 3 | 508 | October 24, 2017 | |
| onReady() function throwing error on EVERY page | 15 | 734 | January 1, 2022 | |
| .loadPage() getting floats despite passing whole numbers as its parameters: "currentPage method cannot be set to the value 1.75" | 10 | 152 | April 29, 2021 | |
| The element selector function (usually $w) cannot be used before the page is ready | 2 | 189 | September 9, 2021 |