Código Javascript :
<style> #slideshow { position:relative; height:400px; width:607px; } #slideshow IMG { position:absolute; top:0; left:0; z-index:8; } #slideshow IMG.active { z-index:10; } #slideshow IMG.last-active { z-index:9; } </style> <script type="text/javascript"> function slideSwitch() { var $active = $('#slideshow IMG.active'); if ( $active.length == 0 ) $active = $('#slideshow IMG:last'); var $next = $active.next().length ? $active.next() : $('#slideshow IMG:first'); $active.addClass('last-active'); $next.css({opacity: 0.0}) .addClass('active') .animate({opacity: 1.0}, 1000, function() { $active.removeClass('active last-active'); }); } $(function() { setInterval( "slideSwitch()", 4000 ); }); </script>
Esto va en el header. y para usarlo dentro del body solo se coloca lo siguiente:
Código Javascript :
<div id="slideshow"> <img src="" alt="<?php bloginfo();?>/paginas/images/h1.png" class="active"/> <img src="<?php echo bloginfo();?>/paginas/images/h2.png" alt="" /> .....<!-- Con todas las imagenes que deseen --> </div>
Pero este script no me sirve para controlar eventos del raton ya que solo funciona secuencialmente.
Como podria hacer para aplicar slide shot a un grupo de 5 imagenes y por ejemplo al darle clic en un boton, se pause el desvanecimento de imagenes, al darle clic a otro retroceder o avanzar a la siguiente imagen y cosas asi..
Ayuda de favor.