Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html how to hide and show multiple

function ToggleVisibility(divClass)
{
    var els = document.getElementsByClassName(divClass);
    for(var i = 0; i < els.length; i++)
    {
        els[i].style.visibility = els[i].style.visibility == "hidden" ? "visible" : "hidden";
    }
}
Comment

html how to hide and show multiple

<div class="hide1">One</div>
<div class="hide2">Two</div>

<a href="#" onclick="ToggleVisibility('hide1'); return false;">One</a>
<a href="#" onclick="ToggleVisibility('hide2'); return false;">Two</a>
<a href="#" onclick="ToggleVisibility('nosuchclass'); return false;">No hide</a>
Comment

PREVIOUS NEXT
Code Example
Html :: html autoplay loop many videos 
Html :: how to horizontal line in html 
Html :: reset button javascript onclick 
Html :: python download html as string 
Html :: how to run html file in xampp server 
Html :: html to exe 
Html :: text field input default value html 
Html :: html in page navigation 
Html :: razor view partial view 
Html :: bootstarp cards 
Html :: input types html 
Html :: mobile navigation bar 
Html :: Tagging with multi-value select boxes 
Html :: defer in html 
Html :: compress scss with node-sass 
Html :: download html page 
Html :: crawler get text, not get html 
Html :: open .html file in webbrowser c# 
Html :: html add hyperlink to button 
Html :: email reply link html 
Html :: how to add public_html 
Html :: bootstrap popup alert 
Html :: Adding multiple class using ng-class 
Html :: lan ips 
Html :: icon for right arrow 
Html :: jinja check if variable is none 
Html :: carousel with javascript 
Html :: how should you use content_for and yield 
Html :: navbar in rows in bootstrap 
Html :: html onload not working 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =