Post by Mason Novak Share this:Use Jquery code the following way in Magento 2 <script> require([ ‘jquery’ ], function ($) { $(function () { // Write code here }); }); </script> Recommended For You Share this: