There is a markup:

<p class="slider"> <img alt="" src="1.jpg" style="position: absolute;"> <img alt="" src="2.jpg" style="position: absolute;"> <img alt="" src="3.jpg" style="position: absolute;"> </p> 

And such a jquery function for a slider:

 $(function(){$('.slider img:gt(0)').hide();setInterval(function(){$('.slider :first-child').fadeOut().next('img').fadeIn().end().appendTo('.slider');},6000);}); 

I try to make pictures links, change in the img function to a, but the slider does not work. What am I doing wrong? How to correctly change the function?

    1 answer 1

    try to change in the js-code "img" to "a"

    • I wrote above that I tried already: the slider starts to work incorrectly. - eva