How can we add custom JS file and to Magento 1 & 2 application globally or on the specific pages i.e Product page or Checkout page?
Can someone help with examples?
Thanks
Following i am sharing the devdocs and other links which helps you to add custom css and js file on a global level and for specific page as well.
Magento DevDocs - https://devdocs.magento.com/videos/fundamentals/add-a-javascript-module/
https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-themes.html
To add globally follow the following link :
https://webkul.com/blog/magento2-how-to-add-css-and-js-file-in-module/
https://code.vky.co.in/magento-2-custom-css-custom-js-custom-module/
To add on the specific page follow the following link :
https://magento.stackexchange.com/questions/114327/magento-2-how-to-include-js-on-the-product-page
Hope it helps !
hi I having an issue when reloading the Magento 2 admin page it is redirecting me to the login page every time I reload the page