Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions components/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ class Dropdown {
constructor(element) {

// Assign this.element to the dropdown element
this.element;
this.element = element;

// Get the element with the ".dropdown-button" class found in the dropdown element (look at the HTML for context)
this.button = this.element.querySelector();
this.button = this.element.querySelector(".dropdown-button");

// assign the reference to the ".dropdown-content" class found in the dropdown element
this.content;
this.content = this.dropdown.querySelector(".dropdownContent");

// Add a click handler to the button reference and call the toggleContent method.
this.button.addEventListener('click', () => {

this.button.addEventListener('click', ()) => {
this.toggleContent();
})
}

Expand Down