I was hoping someone could pls help me out with this darn photo gallery slide show.. everything is working correctly, although I am looking for photos to fade into one another instead of sliding from image to image. There are two buttons on either side of the gallery, one is for previous images, and the other is for the next image. Here is the two SECTIONS of the javascript code that i think does the "animating" : $(document).ready(function(){ current = 1; button = 1; images = 5; width = 850; $('#p1').animate({"left": "0px"}, 400, "swing"); $('#b1').css("backgroundPosition", "left bottom") $('#b1 b').css("color","#fff"); <!-- MORE CODE IN BETWEEN HERE --> function animateLeft(current,button) { $('#p'+current).css("left",width +"px"); $('#p'+current).animate({"left": "0px"}, 400, "swing"); $('#p'+button).animate({"left": -width+"px"}, 400, "swing"); setbutton() } function animateRight(current,button) { $('#p'+current).css("left",-width+"px"); $('#p'+current).animate({"left": "0px"}, 400, "swing"); $('#p'+button).animate({"left": width+"px"}, 400, "swing"); setbutton() } If anyone could steer me in the right direction that would be great. Thanks
Changing from an animated display to a fade/dissolve display will require more of a re-write than simple modifications to an existing script. Generally, fading displays rely on having two or more <div>s positioned on top of one another in a stack using the z-index property. The fade effect is achieved by modifying the opacity of the top slide's <div> to gradually allow the underneath slide <div> to become visible. You can try my free JavaScript slideshow script that includes several variations. There are many, many others available online. Which is best for you will depend on how difficult it is to integrate the new code with your existing gallery and how much experience you have in modifying such scripts. If you're new to JavaScript and CSS, you may have to choose between living with your current script or finding one with the fade effect you want already built-in. Good luck!