Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/429.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript facebook light box jquery在blogger中弹出,延迟30秒_Javascript_Jquery_Popup_Blogger - Fatal编程技术网

Javascript facebook light box jquery在blogger中弹出,延迟30秒

Javascript facebook light box jquery在blogger中弹出,延迟30秒,javascript,jquery,popup,blogger,Javascript,Jquery,Popup,Blogger,我的博客上有一个facebook灯箱弹出,当用户打开我的网站时会立即弹出,但我希望它在页面加载后延迟几秒钟(30秒或1分钟)后弹出。 这是我弹出的jquery代码 <!-- popup plug-in snippet --> <script type='text/javascript'> //<![CDATA[ //grab user's browser info and calculates/saves first visit jQuery.cookie

我的博客上有一个facebook灯箱弹出,当用户打开我的网站时会立即弹出,但我希望它在页面加载后延迟几秒钟(30秒或1分钟)后弹出。 这是我弹出的jquery代码

    <!-- popup plug-in snippet  -->
<script type='text/javascript'>
//<![CDATA[
//grab user's browser info and calculates/saves first visit
jQuery.cookie = function (key, value, options) { if (arguments.length > 1 && String(value) !== "[object Object]") { options = jQuery.extend({}, options); if (value === null || value === undefined) { options.expires = -1; }
if (typeof options.expires === 'number') { var days = options.expires,  t = options.expires = new Date();  t.setDate(t.getDate() + days); } value = String(value); return (document.cookie = [encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : ''].join('')); }
options = value || {}; var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; };
// the pop up actions
//$(function ($) {
jQuery(document).ready(function($){
  if ($.cookie('popup_fb') != 'yes') {
    $('#fb-back').delay(2000).fadeIn("slow"); // options slow or fast
    $('#fb-close, #fb-exit').click(function () {
      $('#fb-back').stop().fadeOut("slow"); // options slow or fast
    });
 }
//initiate popup function by setting up the cookie expiring time
$.cookie('popup_fb', 'yes', { path: '/', expires: 0 });
});
//]]>

//

//1&&String(值)!==“[object]”{options=jQuery.extend({},options);if(value==null | | value==undefined){options.expires=-1;}
如果(typeof options.expires=='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?';expires='+options.expires.toutstring():'',options.path?';path='+options.path:'',options.domain?';domain='+options.domain:'',options.secure?';secure':''。连接('');}
选项=值| |{};var结果,解码=options.raw?函数{returns;}:decodeURIComponent;return(result=newregexp('(?:^ |)'+encodeURIComponent(key)+'=([^;]*)).exec(document.cookie))?解码(结果[1]):null;};
$(函数($){
jQuery(文档).ready(函数($){
如果($.cookie('popup_fb')!='yes'){
$(“#fb back”).delay(30000).fadeIn(“slow”);//选项慢或快
$(“#fb关闭,#fb退出”)。单击(函数(){
$(“#fb back”).stop().fadeOut(“slow”);//选项慢或快
});
}
$.cookie('popup_fb','yes',{path:'/',expires:0});
});
//]]>

jQuery(document).ready(function(){setTimeout(function(){jQuery.lightbox(“www.mydomain.com/popup.html?lightbox[width]=650&lightbox[height]=480”);},10000);});你可以试试这段代码这只是一个例子引用这--->我不太擅长编码?你能给我一些解决方案来修改我的代码,我的工作就可以完成吗?我不能将我的ans粘贴到评论框中,所以请联系我cfprabhu@yahoo.com?
<script type='text/javascript'>
//<![CDATA[
jQuery.cookie = function (key, value, options) { if (arguments.length > 1 && String(value) !== "[object Object]") { options = jQuery.extend({}, options); if (value === null || value === undefined) { options.expires = -1; }
if (typeof options.expires === 'number') { var days = options.expires,  t = options.expires = new Date();  t.setDate(t.getDate() + days); } value = String(value); return (document.cookie = [encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : ''].join('')); }
options = value || {}; var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; };
$(function ($) {
jQuery(document).ready(function($){
  if ($.cookie('popup_fb') != 'yes') {
    $('#fb-back').delay(30000).fadeIn("slow"); // options slow or fast
    $('#fb-close, #fb-exit').click(function () {
      $('#fb-back').stop().fadeOut("slow"); // options slow or fast
    });
 }
$.cookie('popup_fb', 'yes', { path: '/', expires: 0 });
});
//]]>
</script>