This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 1像素透明 --> | |
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"> | |
<!-- 1像素黑色 --> | |
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="> | |
<a href="http://proger.i-forge.net/%D0%9A%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80/[20121112]%20The%20smallest%20transparent%20pixel.html">参考网址</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getCommonParent(el1,el2){ | |
var parents1 = []; | |
var el = el1; | |
while(el) { | |
parents1.unshift(el); | |
el = el.parentNode; | |
} | |
var parents2 = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var THRESHOLD = 150, DELAY = 15; | |
function initBigArrayAsync(max, cb) { | |
var r = [], i = 0; | |
function init(startTime) { | |
while (i < max) { | |
if (new Date - startTime < THRESHOLD) { | |
r[i++] = i; | |
} else { |