2
Hello, I have a script that is an image slideshow with a animate()
to the top. works 100%. but if I add a <a href="#">
in the image. the effect to. could you help me? it keeps working
2
Hello, I have a script that is an image slideshow with a animate()
to the top. works 100%. but if I add a <a href="#">
in the image. the effect to. could you help me? it keeps working
1
The effect for the following reason:
HTML tagged <a>
:
<div>
<div id="container">
<a href="#"><img src="http://duvaleimoveis.com.br/admin/dest/thumb.php?img=fotos/3a8d87a624cfd7dc68bcbd1c2d45ebee.jpg"/></a>
<a href="#"><img src="http://duvaleimoveis.com.br/admin/dest/thumb.php?img=fotos/f15d8f97b154858f411c17ef999ae5ab.jpg"/></a>
</div>
</div>
The tag <img>
becomes children
of a and a children
container and in CSS the is who should be as position absolute
, then in the CSS line:
#container > img
{
position: absolute;
left: 0;
top: 0;
}
change to:
#container > a
{
position: absolute;
left: 0;
top: 0;
}
note that your code will continue to work normally http://jsfiddle.net/d4n7dcnf/16/
thank you very much. I hadn’t thought of that. vlw
I don’t deserve +1 no?
Browser other questions tagged javascript jquery html
You are not signed in. Login or sign up in order to post.
In my experience, a
a
around aimg
does not automatically assume the size ofimg
. But it could be something else. There’s an example of him nay working? (i.e. an example of how you tried to do it and it didn’t work out) By the way, if you can post the most relevant piece of code in the same question instead of an external link, it would be good (the link can follow, help a lot, it would only be better if it wasn’t only the link).– mgibsonbr
Behold this, There’s an example that doesn’t work already with the tags added ?
– Edilson