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)