title: Button does not trigger jquery when page is live
body: <p>I am trying to re-create a popup in the Divi Builder, however the popup is only triggered when in draft mode and not when the button is published?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>jQuery(document).ready(function(t) {
    t('div:not(.et_mobile_menu) .lightbox-content, div:not(.et_mobile_menu) [class*="lightbox-content-"]').addClass("mfp-hide"),
    t("div:not(.et_mobile_menu) .lightbox-trigger").magnificPopup({
      items: {
        src: "div:not(.et_mobile_menu) .lightbox-content",
        type: "inline"
      }
    }), t('div:not(.et_mobile_menu) [class*="lightbox-trigger-"]').each(function() {
      var i = ".lightbox-content-" + Array.prototype.find.call(this.classList, function(t) {
        return t.indexOf("lightbox-trigger-") &gt; -1
      }).split("lightbox-trigger-")[1];
      t(this).magnificPopup({
        items: {
          src: i,
          type: "inline"
        }
      })
    }), t(this).bind('touchstart', function() {
      t(".mfp-wrap").attr("id", "et-boc")
    }), t('[class*="lightbox-content"]').prepend('&lt;div class="lightbox-overlay"&gt;&lt;/div&gt;')
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js" integrity="sha512-IsNh5E3eYy3tr/JiX2Yx4vsCujtkhwl7SLqgnwLNgf04Hrt9BT9SXlLlZlWx+OK4ndzAoALhsMNcCmkggjZB1w==" crossorigin="anonymous" referrerpolicy="no-referrer"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css" integrity="sha512-WEQNv9d3+sqyHjrqUZobDhFARZDko2wpWdfcpv44lsypsSuMO0kHGd3MQ8rrsBn/Qa39VojphdU6CMkpJUmDVw==" crossorigin="anonymous" referrerpolicy="no-referrer" /&gt;
  
  &lt;div class="lightbox-trigger-popup wrapper"&gt;&lt;a href="#" class="lightbox-trigger-popup header-btn"&gt;Play&lt;/a&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>