I have tried to add on scroll animation in my Magento 2 cms page. I used AOS Jquery for that.
I have added the js and CSS file and initialize AOS through cms page but It will shows
Uncaught TypeError: AOS.init is not a function
Does anyone have an idea how to use AOS in Magento2?
Best Answer
You may try this, It works for me.
step 1)
File: app/code/Vendor/Module/view/frontend/requirejs-config.js
Step 2) JS and HTML code in your PHTML file.
Note : I did not use script type="text/x-magento-init" instead I use script type="text/javascript"* to Init AOS.
step 3) Run below commands to remove static files.