I have the following div element:
.description {
color: #b4afaf;
font-size: 10px;
font-weight: normal;
}
<div class="description">Some text here</div>
Then I have a click function on an element to hide the above div:
$('#target').click(function(){
$(".description").hide();
});
When I hide the div, it collapses and stops taking up space. This messes up the layout of my page.
有没有办法隐藏div,但仍然保持它之前占用的空间?我不想改变字体 colored颜色 ,因为它仍然是可选的.