Want to use jQuery in a static block or CMS page? No problem! Open the page or block in Magento 2 admin and insert the following code:
|
1 2 3 4 5 6 7 8 |
<script> require([ 'jquery' ,'domReady!' ], function ($) { console.log('whatever'); }); </script> |
If you do not want to wait for the domReady event, simply…