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"