0

hi,
i am a web and app developer. i need some help in a javascript code which belongs to a wordpress plugin - wp-imageflow2. wp-imageflow2 is a image slider with lightbox features. The slider moves from left to right and then back to the 1st image (basically image1 to last image then back to image1).
My aim is to make the slider move first from image1 to lastImage Then lastImage to firstImage. so far i have tried it to go at reverse direction i.e. right to left (lastImage to firstImage). However when the slider is to move in reverse direction, it only moves back to secondLast Image then to lastImage. this is the code i have developed so far:

this.rotate = function()
{
    /* Do nothing if autorotate has been turned off */

    /* slider moves right to left - reverse direction */
    if (thisObject.image_id == thisObject.max-1) {
            thisObject.glideTo(thisObject.image_id-1);
    }   else
    /*   slider moves left to right - forward direction   */
    if (thisObject.image_id < thisObject.max-1) {
            thisObject.glideTo(thisObject.image_id+1);
    } else 
    if (thisObject.image_id > thisObject.max) {
            thisObject.glideTo(thisObject.image_id-1);
    } 



        /* Set up next auto-glide */
        window.setTimeout (thisObject.rotate, thisObject.conf_autorotatepause);
}

Pls help me out. the code is in a file called imageflowplus.js. a file part of wp-imageflow2. the code provided above is changed by me, except for the function - this.rotate.
Your help will be highly appreciated. THanks.

2
Contributors
1
Reply
6
Views
5 Years
Discussion Span
Last Post by LastMitch
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.