skip to Main Content

JavaScript event deprecated on function with parameters

I was given two functions that are nearly identical, but one uses a parameter. function handleBlur() { const list = event.currentTarget.closest("#nav ul"); if (!event.relatedTarget || !list.contains(event.relatedTarget)) { closeNav(); } } function handleDropdownBlur(btn) { const list = event.currentTarget.closest("#nav ul"); if (!event.relatedTarget…

VIEW QUESTION
Back To Top
Search