For everyone to share an Ajax loading--spin.js

Source: Internet
Author: User

Original address: http://www.cnblogs.com/lxblog/p/3425599.html

When we make Ajax asynchronous requests, we typically use a dynamic Gif small image to make an Ajax Loading to increase the user experience.

Today found on the Internet a spin.js, the JS script compressed 5k, you can use any image, any external CSS style, you can create an AJAX Loading indicator, and compatible with the following browsers:

spin.js Online Design, demo and for : http://fgnass.github.io/spin.js/

In the link page, we can dynamically set the style and automatically generate the style configuration script:

Spin.js usage is extremely simple:

Show Spinner

Target is the parent container that displays Spiner
var Target=document.getelementbyid ("id")
Spinner.spin (target);

Hide Spinner
Spinner.spin ();

For everyone to share an Ajax loading--spin.js (turn)

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.