cancel
Showing results for 
Search instead for 
Did you mean: 

How to use JQuery in Magento2 blocks/templates?

How to use JQuery in Magento2 blocks/templates?

I am trying to use JQuery in my block functions, but I get an error saying JQuery not found. I tried google and some suggested to add it to local.xml but I think Magento2 does not have local.xml.

 

Can anyone help me on how to enable JQuery in Magento2?

 

Thanks

1 REPLY

Re: How to use JQuery in Magento2 blocks/templates?

How can an extension load JavaScript on demand using RequireJS: https://mage2.pro/t/141