如何使用fancybox按钮助手+ fancybox缩略图助手?

我需要同时使用它们(fancybox按钮帮助器和缩略图帮助器)

我一次只能使用其中一个。

以下是每个function的示例: http : //fancyapps.com/fancybox/#examples

已经尝试过使用这两个类:

<a class="fancybox-buttons fancybox-thumbs" 

但它不起作用……一次只有一个,如:

 <a class="fancybox-buttons" 

要么

 <a class="fancybox-thumbs" 

这些是每个的javascripts:

  /* Button helper. Disable animations, hide close button, change title type and content */ $('.fancybox-buttons').fancybox({ openEffect : 'none', closeEffect : 'none', prevEffect : 'none', nextEffect : 'none', closeBtn : false, helpers : { title : { type : 'inside' }, buttons : {} }, afterLoad : function() { this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); } }); /* Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked */ $('.fancybox-thumbs').fancybox({ prevEffect : 'none', nextEffect : 'none', closeBtn : false, arrows : false, nextClick : true, helpers : { thumbs : { width : 50, height : 50 } } }); }); 

谢谢

你只需要一个脚本就可以使用这两个脚本,所以你的html的单个class应该是这样的

  

然后脚本:

 $('.fancybox').fancybox({ openEffect : 'none', closeEffect : 'none', prevEffect : 'none', nextEffect : 'none', closeBtn : false, arrows : false, nextClick : true, helpers : { title : { type : 'inside' }, buttons : {}, thumbs : { width : 50, height : 50 } }, afterLoad : function() { this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); } });