Manuel0815
Newbie
- Jun 12, 2021
- 3
- 1
Hello,
First i want to explain what i want to do.
I have done a website, and in the main part is a section with different Maindivs. Those maindivs have all the same css and html code with a lot of divs in those maindivs. Here for excample:
<section class="_CB11">
<div class="Maindiv>
<div>
<div>
<button></button>
</div>
</div>
</div>
<div class="Maindiv">
same procedure like first Maindiv...
</div>
</section>
My Question:
How can i get the nthChild of the Maindiv when i'm click the button?
And: No i cannot rename every Maindiv to a seperate class or id....
First i want to explain what i want to do.
I have done a website, and in the main part is a section with different Maindivs. Those maindivs have all the same css and html code with a lot of divs in those maindivs. Here for excample:
<section class="_CB11">
<div class="Maindiv>
<div>
<div>
<button></button>
</div>
</div>
</div>
<div class="Maindiv">
same procedure like first Maindiv...
</div>
</section>
My Question:
How can i get the nthChild of the Maindiv when i'm click the button?
And: No i cannot rename every Maindiv to a seperate class or id....