私はdivタグを持っています:
<div id="tier1" class="tier1" >
<a href="#" class="view">View All</a>
</div>
.tier1 {
border-bottom: 1px solid #cccccc;
min-height: initial;
max-height: 245px;
padding: 0 0 8px;
}
max-height
そして、クリックするたびにこのdivを拡張したい"View All"
私はこのスクリプトを使用しています:
<script>
$(document).ready(function () {
$('.view').click(function () {
$('#tier1').animate(function () {
height : 510 ;
}, 1000);
});
});
</script>
しかし、これは max-height までしか拡張されません。スクリプトで maxHeight プロパティを設定しようとしましたが、スクリプトはまったく機能しませんでした。