¿Puedo usar este código para (bootstrap 5) sin jQuery?
<script type="text/javascript"> $( document ).ready(function() { setInterval(function(){ var attend = jQuery('#pills-profile').hasClass('active'); if(attend == true){ jQuery('#id2').show(); jQuery('#id1').hide(); }else{ jQuery('#id2').hide(); jQuery('#id1').show(); } }, 1000) });Algo como esto
document.addEventListener("DOMContentLoaded", function () { const first = document.getElementById("id1"); const second = document.getElementById("id2"); const attend = document.getElementById("pills-profile"); setInterval(function () { if (attend.classList.contains("active")) { second.style.display = "block"; first.style.display = "none"; } else { second.style.display = "none"; first.style.display = "block"; } }, 1000); });