开发者

jQuery: question about children() function

开发者 https://www.devze.com 2022-12-22 16:59 出处:网络
how can I avoid this in jQuery: $(this).parents(\".node-inner\").children()开发者_C百科.children().children();

how can I avoid this in jQuery:

$(this).parents(".node-inner").children()开发者_C百科.children().children();

I tried:

$(this).parents(".node-inner").children(".className");

but it doesn't work.

thanks


You can use the find() function to search through the entire DOM subtree:

$(this).parents(".node-inner").find(".className");
0

精彩评论

暂无评论...
验证码 换一张
取 消