jQuery 应用案例1——table隔行变色
2016-10-22 17:33
204 查看
一、参考文档地址
http://hemin.cn/jq/index.html
二、使用jquery实现table隔行变色
①
$(function{
$('#table tr:even').css('backgroundColor','red');
$('#table tr:odd').css('backgroundColor','blue');
})
②一行代码实现效果
$(function{
$('#table tr').filter(':even').css('backgroundColor','red').end().filter(':odd').css('backgroundColor','blue');
})
http://hemin.cn/jq/index.html
二、使用jquery实现table隔行变色
①
$(function{
$('#table tr:even').css('backgroundColor','red');
$('#table tr:odd').css('backgroundColor','blue');
})
②一行代码实现效果
$(function{
$('#table tr').filter(':even').css('backgroundColor','red').end().filter(':odd').css('backgroundColor','blue');
})
相关文章推荐
- Jquery应用案例之单条新闻的滚动效果(仿雅虎首页新闻滚动)
- 分享10篇优秀的 jQuery 幻灯片制作教程及应用案例
- jQuery实现table隔行换色和鼠标经过变色
- jQuery 表格应用:隔行变色,展开关闭,内容筛选
- JQuery实现table隔行变色及鼠标滑动变色
- Jquery应用案例之单条新闻的滚动效果
- JQuery入门—编写一个简单的JQuery应用案例
- jQuery实现table隔行换色和鼠标经过变色
- jQuery实现table隔行换色和鼠标经过变色
- 用js或Jquery实现table隔行变色以…
- 分享10篇优秀的jQuery幻灯片制作教程及应用案例
- jQuery:1.5.4.3,表格变色(单击行,把当行的单选按钮(radio)设为选中状态,并应用当前样式)
- JQuery入门―编写一个简单的JQuery应用案例
- jQuery实现table隔行换色和鼠标经过变色的两种方法
- JQuery应用案例--JQuery-MySql版:城市省份区域-三级联动
- [原创]持续给力:jQuery实现表格隔行变色效果案例详解
- jquery的table隔行变色、复选框的选择变色
- JQuery应用案例--自动增加行
- jquery学习笔记(4)--实现table隔行变色以及单选框选中
- jQuery中的几个案例:隔行变色、复选框全选和全不选