嗨,我有这个JS CODE
function openPopup(url)
{
var newElem = new Element( 'div' );
newElem.setAttribute('rel','handler');
newElem.setAttribute('class','modal');
SqueezeBox.setContent( 'adopt', newElem );
SqueezeBox.setContent( 'iframe', url);
}
这打开一个带有给定URL的弹出窗口。我想改变SqueezeBox的大小怎么做?
答案 0 :(得分:1)
请尝试 SqueezeBox.resize({x:350,y:400});
当然,您还必须调整内容的大小,如
SqueezeBox.initialize({
size: {x: 350, y: 400}
});
var newElem = new Element( 'div' );
newElem.appendText("Some Text");
newElem.setStyle('border', 'solid 2px black');
newElem.setStyle('width', '300px');
SqueezeBox.setContent('adopt', newElem);
SqueezeBox.resize({x: 750, y: 400})
newElem.setStyle('width', '700px');