- (function fn() {
- fn.now = +new Date;
- $(window).load(function() {
- if (+new Date - fn.now < 500) setTimeout(fn, 500);
- // Do something
- });
- })();
- //该片段来自于http://www.codesnippet.cn/detail/20112012506.html
来源: http://www.codesnippet.cn/detail/20112012506.html