Category: Javascript

Magento 2: Call jQuery in a phtml

Magento 2: Call jQuery in a phtml

Sometimes you just want to use jQuery directly in your phtml file. However, since Magento 2 now uses requirejs, we can no longer simply call jQuery globally. The following snippet shows you how this works.