Select nth child in jquery javascript

后端 未结 2 961
盖世英雄少女心
盖世英雄少女心 2021-01-26 11:45

select nth child like this I want to select seconds child .

$(this).prev().children[1].removeClass(\"necry\").addClass(\"necry_er\");

And this

2条回答
  •  感动是毒
    2021-01-26 12:06

    what about something like this?

    var nec = $(this).parent().find(".necry");
    nec.removeClass("necry");
    nec.addClass("necry_er");
    

提交回复
热议问题