From 5a7681e6d21df2a940ed0be551dfc6590f32783e Mon Sep 17 00:00:00 2001 From: daniela-arias-ordonez Date: Thu, 20 Jun 2019 17:11:01 -0500 Subject: [PATCH] First task completed --- components/Dropdown/Dropdown.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/Dropdown/Dropdown.js b/components/Dropdown/Dropdown.js index c6cad4454..9d436b62f 100644 --- a/components/Dropdown/Dropdown.js +++ b/components/Dropdown/Dropdown.js @@ -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(); }) }