Answers for "select element as role in jquery"

0

select element as role in jquery

// remove active class from all elements
document.querySelectorAll('[role="presentation"]').forEach(function (el){
el.classList.remove("active");
});

// add class 'active' to last element
document.querySelectorAll('[role="presentation"]:last-of-type')[0].classList.add("active")
Posted by: Guest on September-03-2020

Code answers related to "select element as role in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language