Today, my colleagues asked me two questions about jquery very formally, and I also answered them very formally. By the way, I posted the source code here in the hope it will be helpful to my friends:
Question 2: Why is the index value of the pop-up button doubled from 0 when the button is not in ul>li and when
is added after each button? -18?
Answer: Because
is also a sibling element.
The following is the meaning of "sibling" found in Baidu Encyclopedia:
Born to the same parents, such as sibling brothers;