1
私はサイズ変更のdiv要素の幅を取得し、このようなコンソールにそれを表示しようとしています上のdiv要素の幅を取得します..それはjQueryのリサイズ
function matchHeight() {
var newHeight = jQuery("#container").height(); //where #grownDiv is what's growing
\t console.log(newHeight);
}
jQuery(window).on('resize', function(){
matchHeight();
}); \t
#container{
background:tan;
width:100%;
height:500px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="container">
Container Content
</div>
をリフレッシュされていません私は間違っていますか?
あなたは 'サイズ変更'イベントを引き起こすために何をしますか? –