I am looking to dynamically create bullet icons based on the number of div elements present in a slider.
For instance, if there are 2 slider divs, I want to generate 2 bullet icons within another div. If there are no div elements, then the bullets should not be displayed.
My desired output would resemble the following structure:
<div class="mainslider">
<div class="slider"><img src="abc.jpg"></div>
<div class="slider"><img src="xyz.jpg"></div>
</div>
<div class="bullet">
<a href="#1">•</a>
<a href="#2">•</a>
</div>
In essence, my goal is to dynamically generate bullet icons based on the number of slider divs present. Thank you in advance!