I'm having a problem with animate function - my html looks like:
<body>
<div id="blubloc">
<div id="bluhead1">
</div>
<div id="bluhead2">
</div>
<div id="bluhead3">
</div>
</div>
<div id="whitebloc">
<div id="orangediv">
</div>
<div id="rnd">
<img src="img/logo.gif" a开发者_Go百科lt="ROUNDSHOT" />
<a href="" class="button">klik!</a>
</div>
</div>
blubloc is in front of whitebloc, using z-index. I'm trying to animate whitebloc sliding down, showing more infrmation - I'm using
$('.button').click(function(){
$('#whitebloc').animate({top: '+=200px'});
});
whitebloc is positioned absolute, and divs inside are positioned relative. Animation is not working at all...
This fiddle is working for me :
http://jsfiddle.net/Christophe/2bQBA/
精彩评论