Getting Started

The jqxLoader represents a jQuery widget which displays the built-in loading element. The loading element can be icon only, text only or combination of icon and text. It can be used to display loading element until the widget's data is loaded.
Every UI widget from jQWidgets toolkit needs its JavaScript files to be included in order to work properly.

The first step is to create html page and add links to the javascript files and css dependencies to your project. The jqxLoader widget requires the following files:


The next step is to create a DIV element within the body of the html document.

The last step is to initialize the widget by adding the following script to the html document:

To call a function(method), you need to pass the method name and parameters(if any) in the jqxLoader’s constructor.
   
$("#jqxLoader").jqxLoader('open');
    
To set a property(option), you need to pass the property name and value(s) in the jqxLoader's constructor.
$("#jqxLoader").jqxLoader({ height: "150px" });
    
To get a property(option), you need to pass the property name to the jqxLoader's constructor.
var height = $("#jqxLoader").jqxLoader("height");
    
To bind to an event of a UI widget, you can use basic jQuery syntax. The example code below demonstrates how to bind to the "create" event of jqxLoader.
// bind to create event.
$('#jqxLoader').on('create', function () {        
    alert("jqxLoader is created!");
});
    

Basic Sample

The result of the above code is: