上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: [javascript]function mul(func){ return function(){ if(arguments[0] instanceof Array){ var ret = [] for(var i=0,len = arguments[0].length;i=0) ret=arguments[idx]; return wrapper ? new wrappe... 阅读全文
posted @ 2011-03-15 14:32 7hihi 阅读(123) 评论(0) 推荐(0) 编辑
摘要: [javascript]function toRGB(hexColor) { return { r: parseInt(hexColor.slice(1, 3), 16), g: parseInt(hexColor.slice(3, 5), 16), b: parseInt(hexColor.slice(5, 7), 16) };}functi... 阅读全文
posted @ 2011-03-14 12:56 7hihi 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 最近开发项目中遇到一个问题,问题是这样的:我在一个链接上绑带一个click事件,然后把href="javascript:;",这个事件是处理动态加载一个脚本文件源码如下,其中用到克军写的Do[javascript]$('#logined').click(function(e){ Do('js/customs.js',function(){ $('#custom-body').removeClas... 阅读全文
posted @ 2011-03-10 10:35 7hihi 阅读(126) 评论(0) 推荐(0) 编辑
摘要: [javascript]function delay(fn, delayTime) { var arr = Array.prototype.slice.call(arguments), isNum = typeof(delayTime) == 'number'; delayTime = isNum ? delayTime : 0; arr.splice(0, isN... 阅读全文
posted @ 2011-02-23 11:02 7hihi 阅读(226) 评论(0) 推荐(0) 编辑
摘要: [javascript]Array.prototype.distinct = function(){ var i = 0; while( i < this.length ){ var n = this[i]; this.splice(i,1,null); if(this.indexOf(n) < 0){ this.spli... 阅读全文
posted @ 2011-02-19 18:38 7hihi 阅读(120) 评论(0) 推荐(0) 编辑
摘要: [javascript]function in_out(n){ console.log("Level",n);//#1 if(n进入第 1 层=>进入第 2 层=>进入第 3 层=>进入第 4 层跳出第=> 4 层跳出第=> 3 层跳出第=> 2 层跳出第=> 1 层首先,使用参数 1 调用了函数 in_out() ,于是 in_out() 中形式参数 n 的值是 1, 故打印语句 #1 输出了 ... 阅读全文
posted @ 2011-02-17 16:25 7hihi 阅读(479) 评论(0) 推荐(0) 编辑
摘要: [javascript]// Deferred helperwhen: function( object ) { var args = arguments, length = args.length, deferred = length 1 ) { resolveArray = new Array( length ); jQuery.each( args, function( index... 阅读全文
posted @ 2011-02-15 17:11 7hihi 阅读(154) 评论(0) 推荐(0) 编辑
摘要: jquery 1.5 正式版已经出来半个月了,网上有不少blog对其评头论足,都提到说新加入一个Deferred函数 但始终没有一篇给力的东东让人一看就明白到底Deferred是个什么东东.粗略看了一下源码,研究一下它如何使用,在此做个记录...... 首先Jquery里面多了一个$._Deferred和一个$.Deferred,由"_"符号可以看出来$._Deferred是不想被用户直接使用的... 阅读全文
posted @ 2011-02-15 11:24 7hihi 阅读(168) 评论(0) 推荐(0) 编辑
摘要: [html] top [/html] 阅读全文
posted @ 2010-12-01 16:38 7hihi 阅读(1799) 评论(0) 推荐(0) 编辑
摘要: [caption id="attachment_349" align="alignnone" width="374" caption="Trust is the most important thing to the team!"][/caption]偶然间看到一张截图,是杭州小马哥不知何年何月何地做的show,这句话从他嘴里讲出来比平常人讲出来更有分量,很有同感,信任是很重要,信任是一种力量,信... 阅读全文
posted @ 2010-11-23 14:29 7hihi 阅读(98) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页