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 domReady event! Just remove the domReady line, like this:
Using jQuery and domReady in a static block or CMS page
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.