Jquery galleria - 让图库中的第一张图片自动出现

发布于 2024-08-28 16:20:44 字数 297 浏览 5 评论 0原文

我已将优秀的 Galleria 插件添加到我正在开发的网站中。然而,与演示不同的是,我无法在页面加载时自动显示第一张图像。

目前,您必须单击图像,然后图像才会出现,之后一切都会按预期进行。是的,我尝试将第一张图像的类别设置为“活动”,但没有任何效果。

我有什么明显遗漏的吗?

有一个实例: http://kaciekimber.co.za/property/r8453d

I've added the excellent galleria-plugin to a website I'm working on. However unlike the demo, I've been unable to make the first image display automatically on page-load.

Currently, you have to click an image, before one will appear, after that everything works as expected. And yes, I've tried setting the class of the first image to "active", but without that having any effect.

Is there anything obvious I'm missing ?

There's a live example at: http://kaciekimber.co.za/property/r8453d

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

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

发布评论

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

评论(3

她如夕阳 2024-09-04 16:20:44

我想我已经找到问题了。添加

  • 而不是 ,您的第一个图像将自动加载。
  • I think I've found the problem. Add <li class="active"> instead of <img class="active" ... /> and your first image will load automatically.

    柏拉图鍀咏恒 2024-09-04 16:20:44

    试试这个:

    $(function(){
        $('.galleria img:first').click();
    });
    

    Try this:

    $(function(){
        $('.galleria img:first').click();
    });
    
    江心雾 2024-09-04 16:20:44

    是的,它是一个很酷的画廊,我也在使用它:

    http://www.achlandscapes.co。英国/decking.htm

    Yeh its a cool gallery I am using it as well :

    http://www.achlandscapes.co.uk/decking.htm

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