title: How to load content of a UIkit modal asynchronous?
body: <p>I want to show users our privacy text in a modal. The link which triggers the modal is in the footer - so on every page. The content comes from our own API endpoint like this: <a href="https://www.example.com/api/v1/legals/privacy" rel="nofollow noreferrer">https://www.example.com/api/v1/legals/privacy</a></p>
  <p>This is my current modal using UIkit (getuikit.com):</p>
  <pre><code>&lt;a href=&quot;#modal-privacy&quot; uk-toggle&gt;Show Privacy Text&lt;/a&gt;
  
  &lt;div id=&quot;modal-privacy&quot; class=&quot;uk-modal-container&quot; uk-modal&gt;
      &lt;div class=&quot;uk-modal-dialog&quot; uk-overflow-auto&gt;
          &lt;button class=&quot;uk-modal-close-default&quot; type=&quot;button&quot; uk-close&gt;&lt;/button&gt;
          &lt;div class=&quot;uk-modal-header&quot;&gt;
              &lt;h2 class=&quot;uk-h3 uk-modal-title&quot;&gt;Privacy&lt;/h2&gt;
          &lt;/div&gt;
          &lt;div class=&quot;uk-modal-body&quot;&gt;
            &lt;?php
                    $response = file_get_contents( 'https://www.example.com/api/v1/legals/privacy');
                    echo json_decode($response);
            ?&gt;
          &lt;/div&gt;
          &lt;div class=&quot;uk-modal-footer&quot;&gt;
              &lt;p class=&quot;uk-text-right&quot;&gt;&lt;button class=&quot;uk-button uk-button-default uk-modal-close&quot; type=&quot;button&quot;&gt;Close&lt;/button&gt;&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>The problem with my current solution is that the content is loaded by PHP which blocks the rendering of the page and with that affecting the performance of the website. How can I load the content of the modal when opened instead of the initial page view?</p>
  <p>Any help appreciated! I can't write Javascript so a working snippet would be great! </p>
  <p>Greets</p>