问题
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