Search...
disable( )
Disables the mobile element and sets its enabled
property to false
.
Description
Syntax
function disable(): Promise<void>
disable Parameters
This function does not take any parameters.
Returns
Fulfilled - When the mobile element's enabled
property has been set to false
.
Return Type:
Promise<void>
Mixed in from:$w.MobileDisabledMixin
Was this helpful?
Disable a mobile element
Copy Code
1$w("#myMobileElement").disable();
Disable a mobile element and log a message when done
Copy Code
1$w("#myMobileElement").disable()2 .then( () => {3 console.log("Element now disabled");4 } );
Toggle a mobile element's enabled state
Copy Code
1if( $w("#myMobileElement").enabled ) {2 $w("#myMobileElement").disable();3}4else {5 $w("#myMobileElement").enable();6}