Search...
next( )
Moves to the next item.
Description
The next()
function returns a Promise that is resolved when the next
item is completely rendered. Calling next()
when on the last item
moves to the first item.
Notes:
When using
next()
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
next()
, your code may no longer function correctly.
Syntax
function next(): Promise<Element>
next Parameters
This function does not take any parameters.
Mixed in from:$w.PlayableMixin
Related Content:
Was this helpful?
Move to the next item
Copy Code
1$w("#myElement").next();
Move to the next item and log a message when done
Copy Code
1$w("#myElement").next()2 .then( () => {3 console.log("Finished moving to the next item");4 } );