Fancybox + swf 画廊。不调整项目之间的大小
请参阅此处的示例: ( 横幅 > 头晕的流氓 > 查看更多+ ) 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用普通的 fancybox 自定义脚本并使用
afterLoad
选项获取width
和height
即可,如下所示:Just use a normal fancybox custom script and get the
width
andheight
with theafterLoad
option like: