jQuerydiv层的放大与缩小简单实现代码_jquery
来源:划拓汽车网
代码如下:
script>
$(document).ready(function() {
if ($('#content').height() > 400)
$('#content').height(400);
$('#bigger').toggle(function() {
$('#content').height($('#content').height() + 100);
$('#bigger').html('缩小');
}, function() {
$('#content').height($('#content').height() - 100);
$('#bigger').html('放大');
})
});
script>
內容1
內容2
內容3
內容4
內容5
內容6
內容7
內容8
內容9
內容10
內容11
內容12
內容13
內容14
內容15
內容16
內容17
內容18
內容19
內容20
內容21
內容22
內容23
內容24
內容25
放大
显示全文