Fancybox:从活动叠加层内链接到另一个内联html div [英] Fancybox: Linking to another inline html div from within active overlay

查看:102
本文介绍了Fancybox:从活动叠加层内链接到另一个内联html div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的主页上,我建立了以下链接:

On my main page I have the following link(s) built out:

<a href="#ACCT2251" class="fancybox">ACCT 2251</a>

根据#id加载以下内联html内容:

Which loads the following inline html content based on #id:

<div class="pop_up" id="ACCT2251">
    <!-- note these divs are hidden by css class -->
    .
    .
    <a href="#ACCT2252">ACCT 2252</a>
</div>

<div class="pop_up" id="ACCT2252">
    <!-- note these divs are hidden by css class -->
    .
    .
    <a href="#ACCT2251">ACCT 2253</a>
</div>

该部分正在工作.我遇到的问题是从活动的fancybox叠加层链接到另一个内联html #id.查看上面的示例,您会注意到每个内联html div都包含指向另一个内联html div的链接.尽管链接以与主页链接相同的格式构建,但是它不起作用.关于如何进行这项工作的任何想法?

That part is working. The issue I am running into is linking to another inline html #id from the active fancybox overlay. Looking at the example above you will notice that each inline html div contains a link to another inline html div. Although the link is built out in the same format as the main page link it does not work. Any ideas on how to make this work?

提前谢谢!

推荐答案

您需要正确调用它

HTML:-

  <a class="fancyTrigger" href="#TheFancybox">hi</a>
    <hr>
    <div id="TheFancybox">Just adding a paragraph to demonstrate that you can dynamically create HTML content within a DIV using <a class="fancyTrigger1" href="#TheFancybox1">hi</a> 
       </div>
     <div id="TheFancybox1">Just adding a paragraph to demonstrate that you can dynamically create HTML content within a DIV using</div>
    Powered by <a href="http://fancybox.net/" target="_blank">Fancybox</a>

CSS:-

/*  Note that the fancybox css file is loaded under the 
"Add Resources" tab to the left.  Normally you would load it in your <head> */

body {
   background-color: #eef;     
}
#TheFancybox,#TheFancybox1 {
    display: none;
}

Jquery:-

// Note that the fancybox js file is loaded under the 
// "Add Resources" tab to the left.  Normally you would load it in your <head>


$(".fancyTrigger,.fancyTrigger1").fancybox();

可以在此处

这篇关于Fancybox:从活动叠加层内链接到另一个内联html div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆