hide

Dismiss the splash screen.

navigator.splashscreen.hide();

Description

navigator.splashscreen.hide() dismisses the applications 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-2.5.0.js"></script>
    <script type="text/javascript" charset="utf-8">

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

    // Cordova is ready
    //
    function onDeviceReady() {
        navigator.splashscreen.hide();
    }

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

iOS Quirk

  1. In your config.xml, you need to modify the value for "AutoHideSplashScreen” to false

  2. Then, if you want to delay hiding the splash screen for 2 seconds, you can do this in your deviceready event handler:

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