I'm attempting to locate an element by its class name, and then remove the class from it.
My goal is to achieve this using pure JavaScript, without relying on jQuery.
Here is my current approach:
<script>
var changeController = function() {
var removeClass = document.getElementsByClassName("selected-hr")[0];
removeClass.classList.remove("selected-hr");
}
</script>
<div class="col col-25 selected-hr">
<a class="tb-header-link" onclick="changeController()">ALL</a>
</div>
EDIT 1:
Fixed typo in changeController()
method.