摘要:1-http://coolshell.cn/articles/5686.html2-http://mrthink.net/category/jquery/page/3/3-http://www.redcode.nl/blog/2011/10/great-code-is-written-twice-or-more/4-http://ued.taobao.com/blog/2011/08/29/naicha12/#more-43685-http://www.webkit.org/6-Mac系统镜像:http://bbs.pcbeta.com/viewthread-868169-1-1.html7-
阅读全文
摘要:1.减少对DOM Tree的操作,对DOM操作进行缓存?2.一次性修改样式var domNode = document.getElementById('nodeId');domNode.color = '#fff';domNode.className = 'nodeClass';domNode.style.cssText = 'color:red;font-size:14px;';3.缓存DOM元素layout相关属性?4.关于animation的帧宽?
阅读全文
摘要:1.high performance javascript2.even faster websites
阅读全文
摘要:/** * @事件只作用在目标对象-不向父级元素传递 * @param me 事件对象 */function stopBubble(me){ if(window.event){ me.cancelBubble = true;//事件句柄停止将事件传播到包容对象 }else{//w3c if(e && e.preventDefaut && e.stopPropagation) //me.preventDefault();//阻止默认行为 me.stopPropagation();//停止传播 } return false;//对l...
阅读全文
摘要:1.延时执行(有时候需要js函数延时执行、待环境准备好后执行;延缓函数执行):var _timeSignal = null;//延时变量,以便清除/** *@param function 需要延时执行的函数 *@param timeout 延时时间(毫秒) */_timeSignal = setTimeout(function(){...},timeout);clearTimeout(_timeSignal);2.周期执行(有时候需要js函数周期性执行):var _timeSignal = null;//存储周期执行动作,以便清除/** *@param function 周期执行的函数 *@p
阅读全文