表格奇偶行数 显示不同的class 并设置mouseover 的add class发光属性
$(document).ready(function(){
$(".table tr").mouseover(function(){
$(this).addClass("odd");
}).mouseout(function(){ $(this).removeClass("odd");//移除该行的class });
$(".table tr:even").addClass("even"); //tr:even 是代表表格里的偶数行
});
jQuery 拥有若干进行 CSS 操作的方法。我们将学习下面这些:
jQuery 提供多个处理尺寸的重要方法:
其中 : outerWidth() = width(100) + padding(10*2) + border(1*2) = 122
outerWidth(true) = width(100) + padding(10*2) + border(1*2)+ margin(5*2) = 122
innerHeight() = width(100) - padding(10*2) - border(1*2)
原文:http://www.cnblogs.com/uglyspoon/p/5219531.html