Published
- 1 min read
javascript get previous element sibling
The solution for this is noted below
javascript get previous element sibling
Solution
let el = document.getElementById('myId').previousElementSibling
Try other methods by searching on the site. That is if this doesn’t work