javascript hide elements by class 1

javascript hide elements by class

document.getElementsByClassName('class_name')[0].style.visibility='hidden';

Here is what the above code is Doing:
1. It’s getting the element with the class name ‘class_name’
2. It’s getting the first element in the list of elements with the class name ‘class_name’
3. It’s setting the visibility of the element to ‘hidden’

Similar Posts