运用jquery实现table单双行不同显示并能单行选中
摘要:复制代码代码如下:$(document).ready(function(){$("p:odd").css("background-color...
复制代码 代码如下:
$(document).ready(function(){
$("p:odd").css("background-color", "#bbf");
$("p:even").css("background-color","#ffc");
$("p").click(function () {
$("p").each(function(){
if($(this).hasClass("highlight")){
$(this).removeClass("highlight");
}});
$(this).addClass("highlight");
});
});
源码参考gamil:test_jquery_table
【运用jquery实现table单双行不同显示并能单行选中】相关文章:
★ 如何使用PHP+jQuery+MySQL实现异步加载ECharts地图数据(附源码下载)
★ jQuery插件pagewalkthrough实现引导页效果
★ jQuery的Scrollify插件实现滑动到页面下一节点
下一篇:
jquery 表单下所有元素的隐藏