0
我有一个jQuery脚本来调整容器内的所有div,但是当我重新加载页面时,它在Google Chrome中无法正常工作。如果我调整浏览器宽度并重新加载页面,则div会调整大小并使文本溢出div框。我怎样才能解决这个问题?这里是jQuery代码:谷歌浏览器div在页面加载溢出
<script type='text/javascript'>
function resizeDivs() {
$(".container>div").height("");
$('.container').each(function(){
var highestBox = 0;
$('.column', this).each(function(){
if($(this).height() > highestBox)
highestBox = $(this).height();
});
$('.column',this).height(highestBox);
});
}
$(document).ready(function(){
$(".container>div").css('height', 'auto');
resizeDivs();
});
$(window).resize(function() {
$(".container>div").css('height', 'auto');
resizeDivs();
});
</script>
它的伟大工程。谢谢。 – 2013-05-14 22:20:58