Easyloader is the ability to dynamically load scripts and CSS files, or to dynamically load Easyui existing components
You need to refer to the Easyloader.js file, note: There is no need to reference the Jquery.easyui.min.js file.
For example, if you need to load the LinkButton component, you can load it in two ways:
The first is done by setting the class:
<a href= "#" class= "Easyui-linkbutton" onclick= "Load1 ()" > Load calendar </a>
As long as class sets the easyui-component name, Easyloader automatically loads the corresponding component dynamically
The second is implemented by scripting:
using (' Calendar ', function () {alert ("Load succeeded!") ") });
Or
Easyloader.load (' Calendar ', function () {alert ("loaded successfully! ") });
The using is equivalent to easyloader.load, which means that the using is shorthand for the Easyloader.load method.
Common Properties:
1) Locale: localization
Usage: Easyloader.locale = "ZH_CN"; Localization settings
2) Theme: Theme
Usage: Easyloader.theme = "Gray"; Set theme
Event:
1) OnProgress: Triggers after each component is loaded
2) OnLoad: Triggered after the OnProgress event, when the component and the associated component are fully loaded
The difference between the two can be discerned from the name, onprogress events can be used to show progress, and the OnLoad event can be used to prompt the user to use the component.
Easyloader Use of JQuery Easyui