Cufon 和 JQUERY 冲突(无法同时使用 fancybox 和“下拉菜单”)

发布于 2024-12-27 02:13:56 字数 1878 浏览 2 评论 0原文

所以请原谅我对此非常陌生......但我会尽力详细说明问题。

我有一个在 fancybox 页面上运行的脚本,如下所示:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>


<!-- Add fancyBox -->
<link rel="stylesheet" href="css/jquery.fancybox.css?v=2.0.4" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.fancybox.pack.js?v=2.0.4"></script>

<!-- Optionaly add button and/or thumbnail helpers -->
<link rel="stylesheet" href="css/jquery.fancybox-buttons.css?v=2.0.4" type="text/css"     media="screen" />
<script type="text/javascript" src="js/jquery.fancybox-buttons.js?v=2.0.4"></script>

<link rel="stylesheet" href="css/jquery.fancybox-thumbs.css?v=2.0.4" type="text/css"     media="screen" />
<script type="text/javascript" src="js/jquery.fancybox-thumbs.js?v=2.0.4"></script




ul class="list">

    <li>
        <a class="various fancybox.iframe"     href="http://www.topholidayrecipes.com">Iframe</a>
    </li>

</ul>


<script type="text/javascript">
$(document).ready(function() {
    $(".various").fancybox({
        maxWidth    : 800,
        maxHeight   : 600,
        fitToView   : false,
        width       : '70%',
        height      : '70%',
        autoSize    : false,
        closeClick  : false,
        openEffect  : 'none',
        closeEffect : 'none'
    });
});
</script>

现在的问题是这个脚本 -->

* 此脚本使我的下拉菜单(使用 cufon 替换功能)变为静态。我需要这个用于精美框的脚本,但添加此脚本会禁用下拉菜单的动画效果。

位于页面右上角的按钮最初位于:www.topholidayrecipes.com

这是一个使用花式框的页面(链接位于名为“iframe”的食谱框中),但这里的菜单是静态的:http://topholidayrecipes.com/artichokes-recipes.html

请帮忙我带着这个......我将非常感激:)

So excuse me for being really new to this....but I shall try my best to detail the prob.

I have a script running on page for fancybox which is this:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>


<!-- Add fancyBox -->
<link rel="stylesheet" href="css/jquery.fancybox.css?v=2.0.4" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.fancybox.pack.js?v=2.0.4"></script>

<!-- Optionaly add button and/or thumbnail helpers -->
<link rel="stylesheet" href="css/jquery.fancybox-buttons.css?v=2.0.4" type="text/css"     media="screen" />
<script type="text/javascript" src="js/jquery.fancybox-buttons.js?v=2.0.4"></script>

<link rel="stylesheet" href="css/jquery.fancybox-thumbs.css?v=2.0.4" type="text/css"     media="screen" />
<script type="text/javascript" src="js/jquery.fancybox-thumbs.js?v=2.0.4"></script




ul class="list">

    <li>
        <a class="various fancybox.iframe"     href="http://www.topholidayrecipes.com">Iframe</a>
    </li>

</ul>


<script type="text/javascript">
$(document).ready(function() {
    $(".various").fancybox({
        maxWidth    : 800,
        maxHeight   : 600,
        fitToView   : false,
        width       : '70%',
        height      : '70%',
        autoSize    : false,
        closeClick  : false,
        openEffect  : 'none',
        closeEffect : 'none'
    });
});
</script>

NOW PROB IS THIS SCRIPT -->

* This script causes my drop down menu (that uses cufon replace function) to be static. And I need this script for the fancy box, but adding this disables the animation affect of the drop down.

The buttons located at the top right of the page works originally at: www.topholidayrecipes.com

And here is a page that uses the fancy box (link located in the recipes box named "iframe") but here the menu is static: http://topholidayrecipes.com/artichokes-recipes.html

Please help me with this.....I will be very grateful : )

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

日暮斜阳 2025-01-03 02:13:56

您的 js 代码中有一个小错误:

._shadowBox()

这会产生此错误:

Error: 
shadowBox is not a function
Source File: http://topholidayrecipes.com/artichokes-recipes.html
Line: 717

并且会破坏您的 js 代码的其余部分(包括下拉列表的动画效果)。

也许您在卸载 Shadowbox 并移动到 fancybox 后忘记删除该行

You have a little bug in your js code:

._shadowBox()

that is creating this error:

Error: 
shadowBox is not a function
Source File: http://topholidayrecipes.com/artichokes-recipes.html
Line: 717

and that breaks the rest of your js code (the animation affect of the drop down included).

Maybe you forgot to delete that line after unloading shadowbox and moving to fancybox

匿名的好友 2025-01-03 02:13:56

是的,我尝试删除这些代码行,但我发现我无论如何都不需要这些代码。我发现这行代码似乎直接导致下拉菜单出现问题:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

我什至直接从谷歌下载了javascript,并在我的页面中以另一种方式调用它:

<script type="text/javascript" src="js/jquery.google.js"></script> 

它们都运行相同的东西和花哨的盒子正常工作。但我注意到正是用于 fancybox 的这一特定行导致我的下拉菜单出现问题。一旦我删除这行代码,下拉菜单就可以工作了!

yes i tried by removing those lines of codes, but i discovered i dont need those codes anyways. what i discovered is this line of code in particular that seems to cause problems directly with the drop down:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

i have even downloaded the javascript from google directly and called it in my page another way using:

<script type="text/javascript" src="js/jquery.google.js"></script> 

they both run the same thing and the fancy box works as it should. but i noticed that it is this particular line used for the fancybox that's causing problem with my dropdown menu. as soon as i remove this line of code the drop down works!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文