Jquery代码:

1 $("table tr:nth-child(even)").addClass("striped");
2
3 $("tr").mouseover(function() {
4 $(this).addClass("over");
5 }).mouseout(function() {
6 $(this).removeClass("over");
7 })

这里有一个JQuery的链式操作

1 $("tr").mouseover(funtion(){
2         $(this).addClass("over");})
3 $("tr").mouseout(funtion(){
4        $(this).removeClass("over");})
posted on 2011-12-01 17:31  易尔购  阅读(917)  评论(0编辑  收藏  举报