Easyloader Use of JQuery Easyui

Source: Internet
Author: User
Tags locale

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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.