I'm trying to find an element with the class "active" and change its class to "inactive".
Currently I'm getting this error
Cannot set property 'className' of null
javascript:
document.getElementById("active").className = "inactive";
html:
<a href="javascript:;" class="paginationlink active" data-page-number="1"></a>
I don't believe the issue is because I have two classes because I have tried removing the paginationlink
from the element and I still return the same error.
I have looked at a similar issue here and here but I do not have an Id attribute to pull from that would be unique.