Pop up a window

hi guys i wanna popup a window when i open my website. i know how to popup a window on cilck but not this.

thanks


$( window ).load(function() {

  // Run code

//Modal Popup in Yii2

});

im using the pop code inside the layout

here’s my pop up code

<!DOCTYPE html>

<html>

&lt;head&gt;


    &lt;meta charset='utf-8'/&gt;


    &lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.formmail-maker.com/var/demo/jquery-popup-form/colorbox.css&quot; /&gt;


    &#60;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js&quot;&gt;&lt;/script&gt;


    &#60;script src=&quot;http://www.formmail-maker.com/var/demo/jquery-popup-form/jquery.colorbox-min.js&quot;&gt;&lt;/script&gt;





    &#60;script&gt;


        &#036;(document).ready(function(){


            &#036;(&quot;.iframe&quot;).colorbox({iframe:true, fastIframe:false, width:&quot;450px&quot;, height:&quot;280px&quot;, transition:&quot;fade&quot;, scrolling   : true});


        });


    &lt;/script&gt;


    


    


    &lt;style&gt;


        #cboxOverlay{ background:#666666; }


    &lt;/style&gt;


            


&lt;/head&gt;





&lt;body&gt;


     &lt;a class='iframe' href=&quot;&lt;?php echo &#092;Yii::&#036;app-&gt;getUrlManager()-&gt;createUrl(['/screenticketbooking/city']);?&gt;&quot;&gt;Select City&lt;/a&gt;&lt;/p&gt;


&lt;/body&gt;

</html>

what should i do to make it open up when i start my site???


 <script> 

$(document).ready(function(){

$(".iframe").colorbox({iframe:true, fastIframe:false, width:"450px", height:"280px", transition:"fade", scrolling : true}); 

$(".iframe").click(); 

}); 

</script>

But its not correct way i think.

thanks yar. one thing more can i popup a view using modal in yii2 in layout

Yes u can by using jquery