update element visibility