Search results

Getting Started

Initialize the Spinner using createSpinner method and show/hide the spinner using showSpinner and hideSpinner methods accordingly. Set the target to the spinner to render it based on specific target.

  createSpinner({
    target: document.getElementById('container')
  });
  • Show and hide this spinner by using showSpinner and hideSpinner methods for loading in your page.

Create the Spinner globally

The Spinner can be render globally in a page using public exported functions of the ej.popups.

Source
Preview
index.js
index.html
//createSpinner() method is used to create spinner

createSpinner({

  // Specify the target for the spinner to show

  target: document.getElementById('container')

});

//showSpinner() will make the spinner visible

ej.popups.showSpinner(document.getElementById('container'));

setInterval(function () {

  //hideSpinner() method used hide spinner 

  ej.popups.hideSpinner(document.getElementById('container'))

}, 100000);
<!DOCTYPE html><html lang="en"><head>
    <title>EJ2 Spinner</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="TypeScript NumericTextBox Component">
    <meta name="author" content="Syncfusion">
    <link href="//cdn.syncfusion.com/ej2/ej2-base/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-popups/styles/material.css" rel="stylesheet">
    
    
<script src="//cdn.syncfusion.com/ej2/dist/ej2.min.js" type="text/javascript"></script>
</head>
<body>
    <div id="container">
       
    </div>

<script>
var ele = document.getElementById('container');
if(ele) {
    ele.style.visibility = "visible";
 }   
        </script>
<script src="index.js" type="text/javascript"></script>
</body></html>