I have created a code for my ‘see more’ button but when i preview the website this error sign comes up, could anybody help me figure out how to solve this!
Michael, that code looks like it is not inside a button click event. If it’s “roaming free” like that it will be evaluated as the page is loading. The elements being referenced are not on the page yet, hence the error.
Select the ‘see more’ button and then click the “+” button to the right of the onClick event in the properties panel. If you don’t see the properties panel, you can open it from the Tools menu.
Then, you should see a code function block. Put your code in there.
Use the tutorial and it will show exactly where you are going wrong with not including onReady and the export function for the button itself as Anthony as pointed out above.
https://support.wix.com/en/article/wix-code-tutorial-creating-a-show-more-link