2
Guys , I need to put a link in the image and when I did, there is an error in my fade effect done with Jquery. I believe the error lies in the misuse of next(). This fade will only work if the class active is added to the img and not the link! But by a certain logic next()
see href with the next.
<!-- JAVASCRIPT -->
<script type="text/javascript">
function cycleImages(){
var $active = $('#nov-ger .active');
var $next = ($active.next().length > 0) ? $active.next() : $('#nov-ger img:first');
$next.css('z-index',2);//move the next image up the pile
$active.fadeOut(1500,function(){//fade out the top image
$active.css('z-index',1).show().removeClass('active');//reset the z-index and unhide the image
$next.css('z-index',3).addClass('active');//make the next image the top one
});
}
$(document).ready(function(){
// run every 7s
setInterval('cycleImages()', 4000);
})
</script>
...
<!-- HTML-->
<div id="nov-ger">
<a href="http://localhost/#/" class="ESTÁ INSERINDO AQUI">
<img src="http://localhost/imagem.png" class="MAS DEVERIA ESTÁ AQUI!">
</a>
</div>
...
Man! I love you!!!!
– Lollipop