I need to hide pictures when my internet page is loaded, and make them appear later on (they are triggers for other divs appearing/disappearing). The reason is that i don t want them to be clickable until my .animate() function actually makes them appear for real..
So anyways, I tried a simple...
$(document).ready(function(){
$("#img1").hide();
$("#img2").hide();
});
...与HTML...
<img id="img1" src="./images/img1.png" alt="image 1" />
<img id="img2" src="./images/img2.png" alt="image 2" />
...还有CSS
#img1
{
z-index: 4;
position: relative;
top: 0%;
left: 5%;
opacity: 0;
padding: 20px;
}
#img2
{
z-index: 4;
width: 350px;
height: 140px;
position: relative;
top: 0%;
left: 15%;
opacity: 0;
padding: 20px;
}
...但它没有起作用。
有什么想法吗?