Before adding custom js, make sure you already created a custom theme based on one of Argento themes.
With the Argento theme you receive the opportunity to add a custom JS file in Magento 2 that will be automatically included on all pages.
Please follow the steps.
app/design/frontend/Local/argento-[essence|flat]-custom/web/js
define([
'jquery',
'domReady!'
], function($) {
alert("Hi, I'm custom js file");
});
cd magento/root/folder
php bin/magento setup:static-content:deploy
This website uses cookies to improve your experience. By clicking “Deny”, you consent to the use of Necessary cookies only. You may also accept selected cookies only.