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.


$( 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>



    &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;



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






        #cboxOverlay{ background:#666666; }





     &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;



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



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




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