Using jQuery and domReady in a static block or CMS page (Magento 2)

Using jQuery in a Magento 2 static block or CMS page can be tricky, a special syntax is required. Use the following code to add jQuery when all the content was loaded:

Of course, you can skip listening to…