Skip to content

getElementById being called on a class. #3

@qcha0s

Description

@qcha0s

.js file
var doc = document.getElementById('doc');

.html file

<div class="doc">
	<div class="doc__background-ribbon"></div>
	<div class="doc__text-editor hidden"></div>
</div>

getElementById will not work on this, either use getElementsByClassName() or switch the .doc attribute to a #doc attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions