I have a pure JS function in which i have tried to convert majority to jquery. How do I set the entire function to a proper jquery syntax
?
function openResources(e, resourceName) {
var i, tabcontent, tabs;
tabcontent = $(".resources__all-tabs-container");
for (i = 0; i < tabcontent.length; i++) {;
tabcontent[i].style.display = "none";
}
tabs = $(".resources__tabs");
for (i = 0; i < tabcontent.length; i++) {
tabs[i].className = tabs[i].className.replace("
resources__all-tabs", "");
}
document.getElementById(resourceName).style.display= "block";
//$(`"`+ resourceName + `"`)[0].style.display ="block";
e.currentTarget.className += " resources__all-tabs";
}