1、点击表格table的tr时,添加背景颜色,以及在最后一列的后面添加向右图标“>”
// 点击table某行 添加css样式
$("#table1 tbody tr").click(function(){
$(this).addClass("backcolor").siblings("tr").removeClass("backcolor");
$(this).children("th:last-child").append("<i class='glyphicon glyphicon-chevron-right' style='position: absolute; right: 10px; top:10px; color: white' ></i>");
$(this).siblings().find(".glyphicon").remove();
})
2、实现效果