开发者

jquery .animate({top: '+=200px}) dont work

开发者 https://www.devze.com 2023-03-20 17:35 出处:网络
I\'m having a problem with animate function - my html looks like: <body> <div id=\"blubloc\">

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消