The following code shows how to load and use jQuery in a Magento 2 .phtml template.
|
1 2 3 4 5 6 7 8 9 |
<script> // Separate additional libraries with commas // In this example, jQuery UI require(['jquery', 'jquery/ui'], function($){ $(document).ready( function() { alert("fertig :-)"); }); }); </script> |
Using jQuery in a template (phtml)
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.