Jquery web page loading progress bar (casual, of course, should be written at will, when the diary is dynamic), jquery writes at will

Source: Internet
Author: User

Jquery web page loading progress bar (casual, of course, should be written at will, when the diary is dynamic), jquery writes at will
First, let's talk about the time...

The good news is that there is a girl who admires my front-end technology and says she wants to support me. Then there are a lot of envy and hate kids shoes. You're so naive, you must be HR.

Then I said she was not HR, and the spring of the house seemed to be coming... T_T, 25 years of single career. Finally come to the end... then the sister is also the front-end... To ensure a glorious image. I need to improve technology

 

Then, let's take a look at the installation of websites by a group of big cows. Then, I accidentally saw this section. I just wanted to say that the world of the big cows would really play ....

Using data on images and load

Finally, use document. readyState = "complete" to solve the current loading judgment problem.

 $(function () {            var allImgArr = $("img");            allImgArr.data("count", 0);            allImgArr.load(function () {                allImgArr.data("count", allImgArr.data("count") + 1);                var percent = allImgArr.data("count") / allImgArr.length * 100 + "%";                $("#loading-progress").stop(true, false).animate({ "width": percent }, 800);            });            var readyTimer = 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 section, I despise this LOW product every day. After reading it by his code, I think that the progress bar can only be played like this for a long time. Write $ (function () in the webpage () {$ ('. loading '). animate ({'width': '000000'}, 50 )})
<H2 class = "title"> top recommendation 

Http://www.divjs.cn/

 

Continue to vomit: I don't know why my colleagues, HR, and aunt have been making various combinations recently... Let me take off the ticket... Poor me: Even with sunglasses, it cannot reflect "I am tall"

 

 

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.