简体   繁体   English

我如何加载带有fancybox弹出窗口的页面

[英]How can i load page with fancybox popup

I know how to use fancybox popup, normally, which means making an link and click open the fancybox. 我知道通常如何使用fancybox弹出窗口,这意味着建立链接并单击打开fancybox。

But the requirement is, if the user presses a link without logging in, 但是要求是,如果用户在未登录的情况下按下链接,

it has to refresh the page with the popup already opened. 它必须在弹出窗口已经打开的情况下刷新页面。

Is this possible in fancybox? 在fancybox中可以吗?

use jquery click trigger 使用jQuery点击触发器

Script 脚本

        $("#autostart").fancybox().trigger('click');

HTML 的HTML

<a id="autostart" style="display:none" href="select_category.html" class="fancybox fancybox.iframe"></a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM