摘要:
回调函数指当我执行完某一段代码之后在回过头来调用 jquery最简单的例子$(".className").each(function(i){alert(i)}) 她这个形参i是怎么得到的呢 。$.each(fn){ for(i=0;i<this.langth;) fn(this[i++]) ;}php中的回调函数函数有的写法有两种 一种便是传统的写法写法一function test($fn){ $ar = array(1,2,3,4,5,6,7,8); foreach($ar as $v){ $fn($v); }}写法二function test($fn){ ... 阅读全文
posted @ 2013-08-27 00:47
iyoule
阅读(274)
评论(0)
推荐(0)
摘要:
function osCode(){ var boxWidth = parseInt($(".item").css('width')), marginTop = parseInt($(".item").css('margin-top')), marginLeft = parseInt($(".item").css('margin-Left')), lineArr = [0,0,0], nodes = $(".item"); for(var i=0;i<nodes 阅读全文
posted @ 2013-08-27 00:30
iyoule
阅读(225)
评论(0)
推荐(0)