现在的代码是在这样的
$container.children().last().find('.time').html(data[i].pTime);
$container.children().last().find('.textcon').html(data[i].pText); if(data[i].pState !== '健康'){
$container.children().last().find('.dot').addClass('error-dot');
$container.children().last().find('.triangle').addClass('error-triangle');
$container.children().last().find('.textcon').addClass('error-textcon');
}`有没有更加简便的写法啊?
同时find多个div,然后设置html或者添加class,我试了下用逗号隔开不行,求指导~。
翻翻过去那场雪
MYYA
随时随地看视频慕课网APP
相关分类