Fancybox,如何在单击下一个或上一个时跳过元素? [英] Fancybox, how to skip element on clicking next or previous?

查看:74
本文介绍了Fancybox,如何在单击下一个或上一个时跳过元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一种方法可以在不定义类或组的情况下从循环(下一个,上一个)中跳过en元素.

I want to know if there is a method to skip en element from cycling(next,prev) without defining a class or a group.

快速样本.

$('a').fancybox();

那将在每个链接上都花哨.现在我想跳过某些链接...所以我正在做以下事情:

That would call fancy on each link. Now I want to skip certain link... so I am doing the following:

$('a.skip').unbind('click');

可以,但是当我们单击下一个"或上一个"时,问题就出现了,据您所知,它仍会显示该元素...所以问题是:如何在单击上一个"或下一个"时跳过某些元素?

That works but the problem comes when we click next or previous, as you understand it will still display the element... So the question is: how to skip certain element on clicking previous or next?

我知道最简单的方法是将组分开,但是我负担不起...在很多页面上,需要最少的硬编码更改即可发生.我很好奇是否有一种方法可以实现这一目标.

I know the simplest way is to separate the group but I cant afford it... it can happen with lots of pages that require minimum hard coded changes. I am curious if there is a method to achieve that.

谢谢.

推荐答案

$('a:not(.skip)').fancybox();

这篇关于Fancybox,如何在单击下一个或上一个时跳过元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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