Search.../

previous( )

Moves to the previous image or slide.

Description

The previous() function returns a Promise that is resolved when the previous image or slide is completely rendered. Calling previous() when on the first item moves to the last item.

Notes:

Syntax

function previous(): Promise<Element>

previous Parameters

This function does not take any parameters.

Returns

Fulfilled - The newly displayed image or slide.

Return Type:

Promise<Element>

Related Content:

Was this helpful?

Move to the previous item

Copy Code
1$w("#myElement").previous();
Move to the previous item and log a message when done

Copy Code
1$w("#myElement").previous()
2 .then( () => {
3 console.log("Finished moving to the previous item");
4 } );