#DOM Operations For instructions on how to run the tests, check the following link: https://github.com/TelerikAcademy/JavaScript-UI-and-DOM/blob/master/README.md#user-content-preparing-the-local-machine-for-unit-testing-with-mocha-and-chai
##Task 1 Create a function that takes an id or DOM element and:
- If an id is provided, select the element
- Finds all elements with class
buttonorcontentwithin the provided element- Change the content of all
.buttonelements with "hide"
- Change the content of all
- When a
.buttonis clicked:- Find the topmost
.contentelement, that is before another.buttonand:- If the
.contentis visible:- Hide the
.content - Change the content of the
.buttonto "show"
- Hide the
- If the
.contentis hidden:- Show the
.content - Change the content of the
.buttonto "hide"
- Show the
- If there isn't a
.contentelement after the clicked.buttonand before other.button, do nothing
- If the
- Find the topmost
- Throws if:
- The provided DOM element is non-existant
- The id is either not a string or does not select any DOM element