Custom JavaScript not working

[ad_1]

On the home page on my website, I am trying to replicate the style on the home page of this website: [https://www.heavenlybeds.co.uk/](https://www.heavenlybeds.co.uk/)

I’ve used custom CSS to get the style that I want, but am running into a roadblock – The fade-in effects seem to be applying before I scroll onto the relevant section. I tried to apply this functionality with custom Javascript

The JS code can be found [here](https://pastebin.com/MqCtbZdW). Using Elementor I set it to appear at <head>, only on the home page.

Here is the CSS I am using, there don’t seem to be any issues with it: [https://pastebin.com/nY1hAjG4](https://pastebin.com/nY1hAjG4)

Site URL: [https://mariamfashion.uk/](https://mariamfashion.uk/)

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer