DEV Community

Md Abdullah al noor
Md Abdullah al noor

Posted on

why js closest method not find sibling element?

Note: as far as i know that closest() method searches up the DOM tree for the closest element which matches a specified CSS selector.

When i click on margin space between two li element .. it's return null but if i replace margin-bottom: 15px; with padding-bottom... everything is okay...

Top comments (0)