jquery Web page loading progress bar (essay, of course, write casually, when the diary dynamic mood to write it)

Source: Internet
Author: User

First of all, the time to spit ...

The good news is that there is a sister who admires my front-end technology and says I need to be raised.Then there are a lot of envy and hate children's shoes must say, juvenile you are too naïve, it must be HR

Then I said she is not HR, the spring of the house seems to come ... t_t,25 A single career for a year. Finally came to an end ... Then sister is also the front-end ... In order to guarantee the glorious image. I need to try to improve the technology

Then the idle egg today, and then see a bunch of Daniel's loading site, and then inadvertently see this paragraph, just want to say that Daniel's world really can play ....

Using data on the image, and load

Finally, we use document.readystate== "complete" to solve the current load judgment problem.

$(function () {            varAllimgarr = $ ("img"); Allimgarr.data ("Count", 0); Allimgarr.load (function() {Allimgarr.data ("Count", Allimgarr.data ("Count") + 1); varPercent = Allimgarr.data ("Count")/allimgarr.length * 100 + "%"; $("#loading-progress"). Stop (true,false). Animate ({"width": percent}, 800);            }); varReadytimer = SetInterval (function () {                if(Window.document.readyState = = "complete") {clearinterval (Readytimer); $("#loading-progress"). Stop (true,false). Animate ({"width": "100%"}, 800); SetTimeout (function () {                        $(". Loading-box"). Hide (); }, 1200); }            }, 500); });

After seeing this paragraph, despise every day this low goods, by his code looked after, I long time all thought the progress bar can only play like this, writes in the webpage$ (function () {$ ('. Loading '). Animate ({' width ': ' 20% '},50)})
 

$ (function () {$ ('. Loading '). Animate ({' width ': ' 20% '},50)}) </ Script> </div>

http://www.divjs.cn/

continue to spit Groove: I do not know why recently my colleagues, HR, to Auntie , has been in various matchmaking ... Let me take off my order . . Poor me: Even with sunglasses can not reflect the "my Pride"

jquery Web page loading progress bar (essay, of course, write casually, when the diary dynamic mood to write it)

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.