Jquery to Javascript migrate Help

Actually I want to avoid jQuery… So it’s code need to migrate in JavaScript. "Slider Auto play Function "

setInterval(function() {
  var $curr = $('#slider1 input[type=radio]:checked');  
  var $next = $curr.next('input');
  if(!$next.length) $next = $('#slider1 input[type=radio]').first();
  $next.prop('checked', true);
  
}, 2000);

Here is some Example. But doesn’t work

setInterval(() => {
	let $curr = document.querySelectorAll('#slider1 input[type=radio]:checked'),
  		$next = $curr.nextSibling;
      
  if (!$next.length) {
  	$next = document.querySelectorAll('#slider1 input[type=radio]').firstChild;
  }
  $next.setAttribute('checked', true);
}, 3000);

Project Pen: codepen io/codet/pen/bZqgGe

I think you want to be using querySelector, which returns a single DOM node, and not querySelectorAll, which returns a NodeList.

Finally i got this:
setInterval(function(){
var currentID = document.querySelector(‘input[name=“slides”]:checked’).id;
var idNoArr = currentID.split(’’);
var intIdNo = parseInt(idNoArr[1]);
var nextIdNo = intIdNo +1;
var NextId = idNoArr[0]+’
’+nextIdNo;
var NextInput = document.getElementById(NextId);
if(!NextInput){
NextId = idNoArr[0]+’_1’;
}
document.getElementById(NextId).checked = true;
}, 1000);