Fancybox, how to skip element on clicking next or previous?

故事扮演 提交于 2019-12-25 03:53:44

问题


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 quick sample.

$('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.

Thank you.


回答1:


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



来源:https://stackoverflow.com/questions/6329993/fancybox-how-to-skip-element-on-clicking-next-or-previous

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!