标签:code click first addclass btree att fun htm html
var targetSecondNode = $(".secondList")[0];//要监控的dom对象 var obSecondServer = new MutationObserver(function (mutations) {
//dom变化回调的函数
$(".secondList .item-list div:first").addClass("active"); $(".secondList .item-list div:first").click(); }); obSecondServer.observe(targetSecondNode, { attributes: true, childList: true, subtree: true });
标签:code click first addclass btree att fun htm html
原文地址:https://www.cnblogs.com/codeDevotee/p/12658735.html