Fancybox + swf 画廊。不调整项目之间的大小

发布于 2025-01-01 03:55:07 字数 1021 浏览 3 评论 0原文

请参阅此处的示例: ( 横幅 > 头晕的流氓 > 查看更多+ ) http://www.ok-hybrid.com/store/wip/index.html

当它们被快速浏览时,我希望每个横幅都以正确的尺寸显示。 目前,它们都以 728x90 的尺寸显示,即图库中第一个横幅的尺寸。

我用过:

$("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_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>

感谢您的查看。任何帮助表示赞赏。 P。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤云独去闲 2025-01-08 03:55:07

只需使用普通的 fancybox 自定义脚本并使用 afterLoad 选项获取 widthheight 即可,如下所示:

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文