Pure JS please: Hi, This thread: How to Get Element By Class in JavaScript? contains the starting point for my question. How can I replace the class name itself? I just can't seem to get it to work using examples in the link above. Here's my jsFiddle:
Thanks a lot!
<div class="ggg">blavlavbla </div>
function replaceClass()
{
var plusLinks = document.querySelectorAll('ggg');
var firstLink = plusLinks[0];
firstLink.setAttribute('class', 'aw-top-content-mod');
}
replaceClass();