Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Hide all elements with class jQuery

<!-- jQuery: -->
$('.float_form').show(); // Shows
$('.float_form').hide(); // hides

<!--vanilla javascript -->
function toggle(className, displayState){
    var elements = document.getElementsByClassName(className)

    for (var i = 0; i < elements.length; i++){
        elements[i].style.display = displayState;
    }
}

toggle('float_form', 'block'); // Shows
toggle('float_form', 'none'); // hides
 
PREVIOUS NEXT
Tagged: #Hide #elements #class #jQuery
ADD COMMENT
Topic
Name
2+7 =