我有一个日历,这是标记当天的设置
if (i == day) //if is current day
{
$(this.parentNode).addClass('current'); // problem, doesn't work
$("tr:last").append(td tag with class current); // works fine
}
答案 0 :(得分:2)
答案 1 :(得分:0)
$(this).parents("tr").addClass("current");