I have the following script:
<script>
document.getElementById('myId').classList.add('myClass');
</script>
How to alter it and add myClass into #myId a element? I have single anchor element there:
<div id="myId">
<a href="#" title="link">Add class to me</a>
</div>
document.getElementById('myId').classNameaelement inside#myId? Or are there multiple? Do you want to add the class to all of them?