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
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>
<head>
<meta charset='utf-8'/>
<link rel="stylesheet" href="http://www.formmail-maker.com/var/demo/jquery-popup-form/colorbox.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://www.formmail-maker.com/var/demo/jquery-popup-form/jquery.colorbox-min.js"></script>
<script>
$(document).ready(function(){
$(".iframe").colorbox({iframe:true, fastIframe:false, width:"450px", height:"280px", transition:"fade", scrolling : true});
});
</script>
<style>
#cboxOverlay{ background:#666666; }
</style>
</head>
<body>
<a class='iframe' href="<?php echo \Yii::$app->getUrlManager()->createUrl(['/screenticketbooking/city']);?>">Select City</a></p>
</body>
</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