How to open a jquery popup onload instead of onclick
<p>I am trying to create a jquery popup which opens on <strong>onload</strong> of a page instead of <strong>click</strong></p>

<p>presently I have a code which works on click..</p>

<p><strong>javascript.js</strong></p>

<pre><code>$(function() {
    //----- OPEN

    $('[data-popup-open]').on('onload', function(e)  {
        var targeted_popup_class = jQuery(this).attr('data-popup-open');
        $('[data-popup="' + targeted_popup_class + '"]').fadeIn(350);

        e.preventDefault();
    });
});
</code></pre>

<p><strong>html</strong></p>

<pre><code>&lt;a class="btn" data-popup-open="popup-1" href="#"&gt;Open Popup #1&lt;/a&gt;

&lt;div class="popup" data-popup="popup-1"&gt;
    &lt;div class="popup-inner"&gt;
        &lt;h3&gt;hello&lt;/h3&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>here you can see that the popup opens on click, but I want to open it on load, so how do I go about it?</p>

<p>Sorry, but I found the answer...</p>

<p><strong>EDITED javascript.js</strong></p>

<pre><code>$(document).ready(function() {
        $('[data-popup="popup-1"]').fadeIn(350);
});
</code></pre>