Search...
expand( )
Expands the element and sets its collapsed
property to false
.
Description
Syntax
function expand(): Promise<void>
expand Parameters
This function does not take any parameters.
Returns
Fulfilled - When the element's collapsed
property has been set to false
.
Return Type:
Promise<void>
Mixed in from:$w.MobileHiddenCollapsedMixin
Was this helpful?
Expand an element
Copy Code
1$w("#myMobileElement").expand();
Expand an element and log a message when done
Copy Code
1$w("#myMobileElement").expand()2 .then( () => {3 console.log("Done with expand");4 } );
Toggle an element's collapsed state
Copy Code
1if( $w("#myMobileElement").collapsed ) {2 $w("#myMobileElement").expand();3}4else {5 $w("#myMobileElement").collapse();6}