cancel
Showing results for 
Search instead for 
Did you mean: 

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

Highlighted

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

2 REPLIES 2
Highlighted

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.

Highlighted

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

At Infotrench SEO Company - Innovation, quality, creativity, and promptness are the main mantras of Infotrench Technologies and we imbibe these mantras in our work, to the core. We are among the top Search Engine Optimization Company in Gurugram.