javascript-view-swapping Flashcards
What is the event.target?
The read-only target property of the Event interface is a reference to the object onto which the event was dispatched.
element that was interacted with
What is the affect of setting an element to display: none?
none The element is completely removed
What does the element.matches() method take as an argument and what does it return?
Parameters
selectorString is a string representing the selector to test.
Return value
result is a boolean value.
How can you retrieve the value of an element’s attribute?
getAttribute()
At what steps of the solution would it be helpful to log things to the console?
Every time
If you were to add another tab and view to your HTML, but you didn’t use event delegation, how would your JavaScript code be written instead?
If you didn’t use a loop to conditionally show or hide the views in the page, how would your JavaScript code be written instead?
conditional statements, individual click handlers