Home  >  Q&A  >  body text

javascript - Questions about sibling

$(this).find(".pic").addClass("active").siblings.find(".pic").removeClass("active");

When you click on li, find the .pic in li and add style and remove other ones that are not clicked. Is there anything wrong with doing this?

迷茫迷茫2663 days ago804

reply all(2)I'll reply

  • 黄舟

    黄舟2017-07-05 11:03:08

    siblings without brackets

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-07-05 11:03:08

    It seems that the author is not too familiar with jquery,

    reply
    0
  • Cancelreply