Hey there, I'm just starting out with coding and StackOverflow. I'm attempting to create a basic slider but for some reason, the images are not changing. My goal is to cycle through checked input radio buttons every 3 seconds, but something seems to be off.
<div class="slider">
<div class="slides">
<input type="radio" name="radio-btn" id="radio1">
<input type="radio" name="radio-btn" id="radio2">
<input type="radio" name="radio-btn" id="radio3">
<div class="slide first">
<img src="ad_1.jpg" alt="" >
</div>
<div class="slide">
<img src="ad_2.jpg" alt="" >
</div>
<div class="slide">
<img src="ad_3.jpg" alt="" >
</div>
<div class="navigation-auto">
<div class="auto-btn1"></div>
<div class="auto-btn2"></div>
<div class="auto-btn3"></div>
</div>
</div>
</div>
<script>
let count='1';
count.toString();
setInterval(function() {
document.getElementById('radio'+count).checked = true;
count++;
if (count > 3) {
count = '1';
}
},3000);
</script>