Please use `li.hidden = true;`.