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")
Also in JavaScript:
- how to create dynamic json?
- js arrat push
- intval js
- react router 404 redirect
- pick random string from array javascript
- js array add element
- how to get create an array in javascript
- add month date now javascript
- angular directive output
- navigate to route and refresh angular 6
- chartjs min
- video recorder using webrtc and javascript
- mongodb js get id of inserted
- replace multiple spaces with single space javascript
- javascript getelementbyid
- javascript Inserting values in between an array
- add delay for keypress event in extjs
- in in sequelize
- express get full url
- how to clear cache of gradle
- javascript test if it is an array
- nested arrays reactjs tables
- jquery ajax CORS
- javascript convert file to array