码迷,mamicode.com
首页 > Web开发 > 详细

Jquery Lambda delegate

时间:2016-04-24 17:07:45      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:

$("table").delegate("td", "hover", function(){ $(this).toggleClass("hover"); 
});

$("table").each(function(){ $("td", this).live("hover", function(){ $(this).toggleClass("hover"); }); 
}); 

 

Lambda:

delegate int del(int i);
del myDelegate = x => x * x;
int j = myDelegate(5); //j = 25

Jquery Lambda delegate

标签:

原文地址:http://www.cnblogs.com/zhubenxi/p/5427425.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!