title: how to make this simple jQuery popup modal with inside html and bootstrap to be shown on page load
body: <p>I am trying this jQuery popup modal to be shown on page load. I've taken this code in one post here in stackoverflow, where its function was on button click shows the popup. I tried to edit it to show the popup on page load but I couldn't. Any help please.</p>
  <p>here is the jQuery code I'm trying:
  '''</p>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css&quot; integrity=&quot;sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm&quot; crossorigin=&quot;anonymous&quot;&gt;
  &lt;script src=&quot;https://code.jquery.com/jquery-3.2.1.slim.min.js&quot; integrity=&quot;sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js&quot; integrity=&quot;sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js&quot; integrity=&quot;sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
  &lt;script&gt;
  $(function() {
    var modalHtml =
      ' &lt;div class=&quot;modal-content&quot;&gt;' +
      '   &lt;div class=&quot;modal-body&quot;&gt;' +
      '      &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;modal&quot; aria-label=&quot;Close&quot;&gt;' +
      '        &lt;span aria-hidden=&quot;true&quot;&gt;&amp;times;&lt;/span&gt;' +
      '      &lt;/button&gt;' +
      '      &lt;strong&gt;Oh snap!&lt;/strong&gt; Change a few things up and try submitting again.' +
      '   &lt;/div&gt;' + 
      ' &lt;/div&gt;';
     $(window).load(function() {
      $(&quot;.modal-dialog&quot;).html(modalHtml);
      $(&quot;.modal-dialog&quot;).modal('show');
    });
    $(&quot;button&quot;).after('&lt;div class=&quot;modal-dialog modal&quot;&gt;&lt;/div&gt;');
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div&gt;
  &lt;!-- Button trigger modal --&gt;
  &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot;&gt;
    Show Modal
  &lt;/button&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>'''</p>