Fancybox +瑞士法郎画廊。不在项目之间调整大小 [英] Fancybox + swf gallery. Not resizing between items

查看:268
本文介绍了Fancybox +瑞士法郎画廊。不在项目之间调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请看这里例如:
(横幅> dizzee流氓>查看更多+)


当他们被翻动,我希望每个横幅显示在正确的大小。
现在,它们全都显示在728x90 - 图库中第一个横幅的尺寸。



我用过:


$ b $

  $(a.fancybox_swf)。each(function(){
var $ a = $(this);
var h = $ a.data(height)
var w = $ a.data(width);
$ a.fancybox({

'width' :w,
'height':h

以及单个项目:

 < a class =fancybox_swfdata-width =728data-height =90href =swf / dizcash_728x90。 swfrel =diztong> +< / a> 
< a class =fancybox_swfdata-width =300data-height =250href =swf / dizcash_300x250.swf rel =diztong> +< / a>
< a class =fancybox_swfdata-width =728data-height =90href =swf / dizholiday_728x90.swf = diztong> +< / a>
< a class =fancybox_swfdata-width =300data-height =250href =swf / dizholiday_300x250.swf =diztong > +< / a>

感谢您的期待。任何帮助赞赏。
P。

解决方案

只需使用普通的fancybox自定义脚本并获取宽度

code>和 height afterLoad 选项一样:
$ b $ fancybox({
fitToView:false,
afterLoad:function(){
this.width())$ b $ {pre> $(a.fancybox_swf = $(this.element).data(width);
this.height = $(this.element).data(height);
}
}); // fancybox


Please see here for example: ( banners > dizzee rascal > see more+ ) http://www.ok-hybrid.com/store/wip/index.html

As they are flicked through, I'd like each banner to show at the correct size. As is, they are all showing at 728x90 - the dimensions of the 1st banner in the gallery.

I've used:

$("a.fancybox_swf").each(function(){
   var $a = $(this);
   var h = $a.data("height")
   var w = $a.data("width");
   $a.fancybox({

            'width' : w, 
            'height': h

and for the individual items:

<a class="fancybox_swf" data-width="728" data-height="90" href="swf/dizcash_728x90.swf" rel="diztong">+</a>
<a class="fancybox_swf" data-width="300" data-height="250" href="swf/dizcash_300x250.swf" rel="diztong">+</a>
<a class="fancybox_swf" data-width="728" data-height="90" href="swf/dizholiday_728x90.swf" rel="diztong">+</a>
<a class="fancybox_swf" data-width="300" data-height="250" href="swf/dizholiday_300x250.swf" rel="diztong">+</a>

Thanks for looking. Any help appreciated. P.

解决方案

Just use a normal fancybox custom script and get the width and height with the afterLoad option like:

 $("a.fancybox_swf").fancybox({
  fitToView: false,
  afterLoad: function(){
   this.width = $(this.element).data("width");
   this.height = $(this.element).data("height");
  }
 }); // fancybox

这篇关于Fancybox +瑞士法郎画廊。不在项目之间调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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