JQueryEasyUI is a quick component built based on JQuery UI. Today we will introduce EasyLoader functions. EasyLoader can dynamically load scripts and CSS files, or dynamically load existing components of EasyUI.
You need to reference the EasyLoader. js file. Note: you do not need to reference the jquery. easyui. min. js file here.
For example, you can use the following two methods to load the linkbutton component:
The first method is implemented by setting the class:
Load calendar
As long as easyui-component name is set for the class, easyloader automatically loads the corresponding component dynamically.
The second method is implemented through scripts:
Using ('calendar ', function () {alert ("loaded successfully! ")});
Or
Easyloader. load ('calendar ', function () {alert ("loaded successfully! ")});
Here, using is equivalent to easyloader. load, that is, using is short for the easyloader. load Method.
Usage: easyloader. theme = "gray"; // sets the topic.
Event:
1) onProgress: triggered after each component is loaded
2) onLoad: triggered after the onProgress event. triggered when all components and associated components are loaded
The difference between the two can be seen from the name. onProgress events can be used to display the progress, while onLoad events can be used to prompt users to use components.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.