Javascript slideshow with images sliding in from the left

Posted on 2009-02-09
Last Modified: 2012-06-27
I'm trying to create a slide show in which the new image slides in from the left to cover the current image.  Or the current image slides off to the right revealing the new image underneath it.

The way it is now, when you choose animation type 'slide' or 'slidefade', the images come from and return to the upper left corner, zooming in and out at the same time. What is causing that in the javascript, and how do I modify the script so that they just slide in and out as I described above?



This is a followup to:
Question by:gabrielPennyback
    LVL 16

    Accepted Solution

    Perhaps something like
    might better fit your needs?
    LVL 1

    Author Comment

    Very helpful links, sh0e, thanks. These are very cool, much cooler than what I was trying to do.

    Still I would love to know how to modify the script you gave me to work different ways. For eaxmple I tried fooling around with this bit of code and nothing I do changes the way it works.

    else if (settings.animationtype=='slideright'){

    I even commented out the active lines and it still worked the same way. ???

    else if (settings.animationtype=='slideright'){
               // $(elements[last]).animate({width:'hide'},settings.speed);

    So how would I code it so that the current image stays exactly where it is and the new image slides in from the left right over it?

    Obviously the ready made stuff is way better than I could come with, but I just want to get a better grasp of the language of javascript, and no what words produce what results.

    If you can get me to learn that much here, I promise I'll stop bothering you for a while :-)

    Here's my latest:



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Hire Freelancers to Complete JavaScript Projects

    Source the talented Expert Exchange community
    for top quality work on your JavaScript projects.

    Hire the best. Collaborate easily. Get quality work.

    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now