jQuery 流沙 + Captify(滚动脚本)

发布于 2024-10-15 22:35:48 字数 433 浏览 5 评论 0原文

所以我有一个小问题,我的 jQuery Captify(图像翻转标题)和 Quicksand(图像过滤系统)不能很好地协同工作。页面加载时,当我将鼠标悬停在图像上时,我的 Captify 运行良好,但是一旦我单击链接来过滤缩略图,captify 脚本就会停止工作。

我尝试每 x 秒调用一次 captify 脚本,但我要么没有正确执行,要么这不是正确的解决方案。有人可以帮我吗?该网站位于 http://www.galaxyturbo.net/new/index.php

如果您有 Firebug 或类似的开发工具(例如 Google Chrome),您可以从那里查看我的代码,我只是不想向此页面发送垃圾邮件。如果您能在这里帮助我,请提前非常感谢,我真的很绝望。

so I have a little issue with my jQuery Captify (Caption on image rollovers) and Quicksand (Image filtering system) not working so well together. When the page loads, my Captify works well when I roll my mouse over the images, however as soon as I click a link to filter my thumbnails, the captify script stops working.

I tried to call the captify script every x seconds, but I'm either not doing it correctly or it's just not the right solution. Can anyone help me out? The site can be found at http://www.galaxyturbo.net/new/index.php

If you have Firebug or similar developer tools like in Google Chrome, you can take a look at my code from there, I just didn't want to perhaps spam this page. Thanks SO much in advance if you can help me out here, I'm really desperate.

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

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

发布评论

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

评论(1

乜一 2024-10-22 22:35:48

好吧,我想说我们都需要学习更多 JavaScript,但我遇到了同样的问题,这就是你如何让它工作:

你需要做的是在 QUICKSAND 克隆之后调用 CAPTIFY 函数!
所以寻找流沙的 JS 代码,寻找:

    $holder.quicksand($filteredData, {
        duration: 800,
        easing: 'easeInOutQuad'
    });
    return false;

应该看起来像这样:

    $holder.quicksand($filteredData, {
        duration: 800,
        easing: 'easeInOutQuad'
    },
    // RECALL CAPTIFY  ===============================
       function() { $('img.captify').captify({
        speedOver: 'fast',
        speedOut: 'normal',
        hideDelay: 500,
        animation: 'slide',
        prefix: '',
        opacity: '0.7',
        className: 'caption-bottom',
        position: 'bottom',
        spanWidth: '100%'
        });
       }
    // RECALL CAPTIFY  ==============================
    );
    return false;

希望有帮助!
此外,您还必须对其他脚本执行相同的操作,例如 LightBox 或 PrettyPhoto 。

Well, I would say we both need to learn more JavaScript, but I had the same problem, and here is how you make it work :

What you need to do is RECALL THE CAPTIFY FUNCTION AFTER THE QUICKSAND CLONNING !
so look for the JS code for quicksand, look for :

    $holder.quicksand($filteredData, {
        duration: 800,
        easing: 'easeInOutQuad'
    });
    return false;

that should look like this :

    $holder.quicksand($filteredData, {
        duration: 800,
        easing: 'easeInOutQuad'
    },
    // RECALL CAPTIFY  ===============================
       function() { $('img.captify').captify({
        speedOver: 'fast',
        speedOut: 'normal',
        hideDelay: 500,
        animation: 'slide',
        prefix: '',
        opacity: '0.7',
        className: 'caption-bottom',
        position: 'bottom',
        spanWidth: '100%'
        });
       }
    // RECALL CAPTIFY  ==============================
    );
    return false;

hope that helps !
also, you will have to do the same with other scripts, like LightBox or PrettyPhoto .

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