Search...
hide( )
Hides the element and sets its hidden
property
to true
.
Description
The hide()
function hides the element and returns a Promise that is
resolved when the effect is complete and the element's hidden
property has been set to true
.
To learn about the behavior of a hidden element,
see the hidden
property.
You can also hide an element when the app loads by using the Properties panel in the Editor.
Syntax
function hide(): Promise<void>
hide Parameters
This function does not take any parameters.
Returns
Fulfilled - When the element's hidden
property has been set to true
.
Return Type:
Promise<void>
Mixed in from:$w.MobileHiddenCollapsedMixin
Was this helpful?
Hide an element
Copy Code
1$w("#myMobileElement").hide();
Toggle an element's hidden state
Copy Code
1if( $w("#myMobileElement").hidden ) {2 $w("#myMobileElement").show();3}4else {5 $w("#myMobileElement").hide();6}