Código HTML:
<HEAD> <SCRIPT src="/mootools.js" type=text/javascript></SCRIPT> <SCRIPT> window.addEvent('domready', function() { //set the default image activeImage = 'img1'; activeLink = '1'; //initialise the default image var initialise = $(activeImage).setStyles({display:'block',opacity: 0}); new Fx.Style(initialise, 'opacity', {duration: 1} ).set(1); $(activeLink).className = "active"; //event listener $('banner-nav').getElements('a').addEvent('mouseenter', function(e) { new Event(e).stop(); $(activeLink).className = ""; this.className = "active"; activeLink = this.id; var newImage = 'img'+this.id; transitionImage(activeImage,newImage); }); }); function transitionImage(oldImage,newImage) { var fadeOut = function() { var div = $(oldImage).setStyles({ opacity: 1 }); new Fx.Style(div, 'opacity', {duration: 700}).start(0); fadeIn(); }; var fadeIn = function() { var div2 = $(newImage).setStyles({ display:'block', opacity: 0 }); new Fx.Style(div2, 'opacity', {duration: 700}).start(1); }; if(newImage != activeImage) { fadeOut(); activeImage = newImage; } } </SCRIPT> </HEAD> <BODY> <DIV id=banner-container> <IMG id=img1 src="1.jpg"> <IMG id=img2 src="2.jpg"><IMG id=img3 src="3.jpg"> <IMG id=img4 src="4.jpg"> <DIV id=banner-nav> <UL> <LI><A id=1 href="http://www.stevenyork.com/demos/banner-transitions/#1">Item Uno</A> </LI> <LI><A id=2 href="http://www.stevenyork.com/demos/banner-transitions/#2">Item Dos</A> </LI> <LI><A id=3 href="http://www.stevenyork.com/demos/banner-transitions/#3">Item Tres</A> </LI> <LI><A id=4 href="http://www.stevenyork.com/demos/banner-transitions/#4">Item Cuatro</A></LI> </UL> </DIV></DIV> </BODY>
Agradeceré mucho con algo de codigo de implementación, ya que no manejo JScript muy bien por favor. Gracias