splashscreen.hide

Dismiss the splash screen.

navigator.splashscreen.hide();

Description

This method dismisses the application's splash screen.

Supported Platforms

  • Android
  • iOS

Quick Example

navigator.splashscreen.hide();

Full Example

<!DOCTYPE html>
<html>
  <head>
    <title>Splashscreen Example</title>

    <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
    <script type="text/javascript" charset="utf-8">

    // Wait for device API libraries to load
    //
    document.addEventListener("deviceready", onDeviceReady, false);

    // device APIs are available
    //
    function onDeviceReady() {
        navigator.splashscreen.hide();
    }

    </script>
  </head>
  <body>
    <h1>Example</h1>
  </body>
</html>

iOS Quirk

The config.xml file's setting for AutoHideSplashScreen must be false. To delay hiding the splash screen for two seconds, add a timer such as the following in the [deviceready](../events/events.deviceready.html) event handler:

    setTimeout(function() {
        navigator.splashscreen.hide();
    }, 2000);