我有一个div标签:股利上点击JQuery的展开
<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;
}
我想扩大这个div超越max-height
每当我在"View All"
单击我使用这个脚本:
<script>
$(document).ready(function() {
$('.view').click(function() {
$('#tier1').animate(function() {
height : 510 ;
}, 1000);
});
});
</script>
但是这扩展到只有最大高度。我甚至尝试在脚本中设置maxHeight属性但是脚本根本不起作用。
似乎不太可能,运行在所有的,因为'高度:510px;'是一个语法错误。 –
你不能使用'animate(function()'的方式来做动画,看看我的答案 – Anton