basic javascript css manipulation

react Js event

Get the parent element then child element

e.target.parentElement.parentElement.querySelector('ul');

Sibling element

let nextSibling = currentNode.nextElementSibling;

Setting CSS

element.style.display = 'block'

Set Css Height in js

element.style.height = '100px';

clear css height in css

element.style.removeProperty('height');

Comments