I tried to use jQuery in a template (app\code\Black\Newsletter2Go\view\frontend\templates\account\dashboard\info.phtml) but I get jQuery is not defined.

Does Magento 2 not use jQuery?

Do I have to add:


to the head template?


No need to add jquery in head, You can add like below method in phtml

    ],function($) {
         $(document).ready(function() {
            /* Your logic */
| improve this answer | |

Your Answer

