Hi Guys,
I have finally managed to get a good html animation fro my progress bar. However, the animation starts the moment the page is load, but not when I scroll to it. I've tried using the on viewport code but still couldn't get around it. Any idea how I can resolve this?
Here is the link:
https://jermaiinelim.wixsite.com/mysite-2
I'm just doing it for a charity website as a volunteer. No coding needed, but just curious on how it would work. Thanks for your help anyway. :)
Your page code is not sending a message to the HtmlComponent. See the section Sending a Message from Page Code to an HTML Element to learn how to send a message to the embedded code in the HtmlComponent. See the section Receiving a Message from Page Code in an HTML Element to see how to handle a message that's sent to the embedded code. Once you receive the message, you can then run the animation of your script.
You are sending a message to the HtmlComponent when the html5_viewportEnter() function is triggered, but your embedded code (in the HtmlComponent) does not handle the message.
See the article Corvid: Working with the HTML Element for information on working with the HtmlComponent. Refer to the article section Receiving a Message from Page Code in an HTML Element to see how to handle a message that's sent to the embedded code.