JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ilyas.host-yes.ru/bitrix/fancybox2/jquery.fancybox.css" type="text/css" media="screen" />
<script src="http://ilyas.host-yes.ru/bitrix/fancybox2/jquery.fancybox.js" type="text/javascript"></script>
<script src="http://ilyas.host-yes.ru/bitrix/fancybox2/jquery.cookie.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
function fancybox_show()
{
$(function () {
$.fancybox.open([
{
type: 'iframe',
href : 'http://ilyas.host-yes.ru/bitrix/vk.html'
//
}
], {
padding : 0,
autoSize: false,
autoDimensions: false,
width: 416,
height: 416,
fitToView: false,
margin: 0,
helpers : {
overlay : {
locked : false
}}
});
});
}
var date = new Date();
var mSec = 20*1000;
function show_fancybox(){
if($.cookie('fancybox_show')){}else{
// запускаем fancybox
fancybox_show();
date.setTime(date.getTime()+mSec);
$.cookie('fancybox_show', date.getTime(),{ path: "/", expires: date});
}
}
$(function(){
show_fancybox();
setInterval(show_fancybox, 5000);
})
});
</script>