【发布时间】:2011-06-07 10:51:02
【问题描述】:
我知道如何切换整个 div,但是我只想隐藏除前 10% 或前 100px 之外的所有内容。然后当点击 div 时,会打开整个 div。
我以为我不久前看到了这个,但不记得在哪里。
谢谢。
$(document).ready(function() {
// hides the slickbox as soon as the DOM is ready
$('#slickbox').hide();
// toggles the slickbox on clicking the noted link
$('#slick-toggle').click(function() {
$('#slickbox').toggle(400);
return false;
});
});
【问题讨论】:
标签: html toggle visibility