Possible Duplicate:
How to hide a div with jQuery?
Is there any way to hide the content of div in css without using the display: none; because it remove the object from code.
I also used the visibility: hidden; but the image content of div still display
Place the contents inside of a inner div and set that inner div to display none.
Set visibility to hidden and don't set the visibility of the descendants (the images that are showing up) to visible.
with jQuery you can do
$('div').hide();
If you want to be more specific you can use an id or class name instead if div.
ex: $('#myid').hide();
You can store the contents in temporary and then do empty, restore these content to the DIV when you need.
var contents= $('divId').html();
$('divId').html('');
精彩评论