Home  >  Article  >  Web Front-end  >  Some confusions in the use of jquery index_jquery

Some confusions in the use of jquery index_jquery

WBOY
WBOYOriginal
2016-05-16 17:18:481160browse

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:

Copy code The code is as follows:







    < ;br />















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;
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn