I have a small sample of HTML that looks like this
<ul>
<li data-slide-to="0" data-target="#myCarousel" class="appendLi"></li>
<li data-slide-to="0" data-target="#myCarousel" class="appendLi"></li>
<li data-slide-to="0" data-target="#myCarousel" class="appendLi"></li>
<li data-slide-to="0" data-target="#myCarousel" class="appendLi"></li>
<li data-slide-to="0" data-target="#myCarousel" class="appendLi"></li>
</ul>
I can't edit the HTML itself due to what I'm doing, but I need to basically add a number each time to data-side-to using only js, like so
<ul>
<li data-slide-to="0" data-target="#myCarousel" class="appendLi"></li>
<li data-slide-to="1" data-target="#myCarousel" class="appendLi"></li>
<li data-slide-to="2" data-target="#myCarousel" class="appendLi"></li>
<li data-slide-to="3" data-target="#myCarousel" class="appendLi"></li>
<li data-slide-to="4" data-target="#myCarousel" class="appendLi"></li>
</ul>
Any ideas?