我在我的一个网站上使用了 fancybox 插件。我真的很喜欢使用它,直到遇到这个问题。在fancybox里面我想放一个手风琴。问题是我希望花式框的高度增加,并且在折叠手风琴时不显示滚动条。
请点击这里查看我当前的代码
我在我的一个网站上使用了 fancybox 插件。我真的很喜欢使用它,直到遇到这个问题。在fancybox里面我想放一个手风琴。问题是我希望花式框的高度增加,并且在折叠手风琴时不显示滚动条。
请点击这里查看我当前的代码
花哨的盒子打开后,您需要更新高度。更新了您的代码添加afterShow
$(".fancybox").fancybox({
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
autoDimensions: true,
height: 'auto',
afterShow: function(){
$.fancybox.update()
}
});
我在下面的网址 http://jsfiddle.net/sunnyjaysabuero90/wufGk/的 height:'auto' 之后添加了下面的代码,它可以工作
$(".fancybox").fancybox({
openEffect : '弹性',
开放速度:150,
closeEffect : '弹性',
关闭速度:150,
自动尺寸:真,
高度:'自动',
演出前:函数(){
this.width = $('.fancybox-iframe').contents().find('html').width();
this.height = $('.fancybox-iframe').contents().find('html').height();
}
适合查看:假
});
$('.accordionButton').click(function() {
$('.accordionButton').removeClass('accordionButton-open');
$('.accordionContent').slideUp('fast');
if($(this).next().is(':hidden') == true) {
$(this).addClass('accordionButton-open');
$(this).next().slideDown('fast');
}
});