[英]SharePoint: jQuery toggle removing all SharePoint top divs, leaves space on bottom of web page?
So I have a jquery toggle event on a button for a SharePoint 2010 page. 所以我在SharePoint 2010页面的按钮上有一个jquery切换事件。 If clicked it just hides the SharePoint constructs:
如果单击它,只会隐藏SharePoint构造:
$('#s4-topheader2,#s4-titlerow,#RibbonContainer,#s4-ribbonrow').toggle(500);
works fine, but after it is used the web page doesn't reach to the bottom of the page anymore? 工作正常,但是使用完之后,网页不再到达页面底部吗? only after the top divs are brought back.
只有在最高级的div重新出现之后。 So I am guessing there is a little piece I could add to get around this?
所以我想我可以添加一小部分来解决这个问题? why is this the case?
为什么会这样呢?
Your code works fine for me in IE and Chrome but if you want to re-size s4-workspace manually you should re-size after the animation has finished like: 您的代码在IE和Chrome中对我来说效果很好,但是如果您想手动调整s4-workspace的大小,则应在动画完成后重新调整大小,例如:
$('#s4-topheader2,#s4-titlerow,#RibbonContainer,#s4-ribbonrow').toggle(500, function(){
$('#s4-workspace').height($(window).height());
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.