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:
When using
previous()
on a gallery, make sure the gallery is one where theisPlayable
capability istrue
.If you change a gallery's type to one that doesn't support
previous()
, your code may no longer function correctly.
Syntax
function previous(): Promise<Element>
previous Parameters
This function does not take any parameters.
Mixed in from:$w.PlayableMixin
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 } );