how to run a .click on elems parent sibling selector?
问题 Below is my most recent attempt: var aSl = document.querySelector('input[id^="blahblah"]'); aSl.closest("span.k-icon.k-i-expand").click(); It returned: myjs.js:181 Uncaught TypeError: Cannot read property 'closest' of null I have also tried parent.sibling in place of .closest above - that returned '...parent is not a function' error. Below is my mark-up: <span class="k-icon k-i-expand">::before</span> <--- this is what I'm trying to run .click() on <span class="k-checkbox-wrapper"> <input