cancel
Showing results for 
Search instead for 
Did you mean: 

How to add custom JS and CSS file in Magento 2?

How to add custom JS and CSS file in Magento 2?

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?

 

Examples will be much appreciated.

 

Thanks

1 REPLY 1

Re: How to add custom JS and CSS file in Magento 2?

Hi @babarshinec7b6 ,

 

I am sharing some links. Please go through them once.

 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 on the specific page follow below link : 

 

https://magento.stackexchange.com/questions/114327/magento-2-how-to-include-js-on-the-product-page

 

Thanks!

 

--------------------------------------

Problem Solved! Click Kudos and Accept as Solution.