animate () does not work with href

2

Hello, I have a script that is a slideshow of images with a animate() to the top. works 100%. but if I add a <a href="#"> to the image. the effect for. can you help me? keep it running

link

    
asked by anonymous 04.12.2015 / 02:45

1 answer

1

The effect for the following reason:

HTML with tag <a> :

<div>
    <div id="container">
      <a href="#"><img src="http://duvaleimoveis.com.br/admin/dest/thumb.php?img=fotos/3a8d87a624cfd7dc68bcbd1c2d45ebee.jpg"/></a><ahref="#"><img src="http://duvaleimoveis.com.br/admin/dest/thumb.php?img=fotos/f15d8f97b154858f411c17ef999ae5ab.jpg"/></a></div></div>

Thetag<img>becomeschildrenaandchildrenofcontainerandinCSStheaiswhoshouldbeaspositionabsolute,theninCSSline:

#container>img{position:absolute;left:0;top:0;}

changeto:

#container>a{position:absolute;left:0;top:0;}

Notethatyourcodewillcontinuetofunctionnormally link

    
04.12.2015 / 07:17