Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Accordian in jquery

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 120
    Comment on it

    Accordian are used when we have to show/hide large amount of content, so it is expandable and collapsible. we can also add symbol to indicate whether collapsible content is open or closed

    <!DOCTYPE html>
    <html>
    <head>
    <style>
    button.demo {
        background-color: #eee;
        color: #444;
        cursor: pointer;
        padding: 18px;
        width: 100%;
        border: none;
        text-align: left;
        outline: none;
        font-size: 15px;
        transition: 0.4s;
    }
    
    button.demo.active, button.demo:hover {
        background-color: #ddd;
    }
    
    div.abc {
        padding: 0 18px;
        background-color: white;
        max-height: 0;
        overflow: hidden;
        transition: 0.6s ease-in-out;
        opacity: 0;
    }
    
    div.abc.show {
        opacity: 1;
        max-height: 500px;  
    }
    </style>
    </head>
    <body>
    
    <h2>Evon Technologies</h2>
    
    <button class="demo">part 1</button>
    <div class="abc">
      <p>Like most of our kind we are a custom software development company. Our different units for design, application development (desktop, web and mobile) and QA help us satisfy all your technology needs. Our complete ecosystem revolves around the quality of codes and services we provide to our clients. Our team works hard to improve itself, starting from HTML to implementation of design patterns from "gang of four". </p>
    </div>
    
    <button class="demo">part2</button>
    <div class="abc">
      <p>Like most of our kind we are a custom software development company. Our different units for design, application development (desktop, web and mobile) and QA help us satisfy all your technology needs. Our complete ecosystem revolves around the quality of codes and services we provide to our clients. Our team works hard to improve itself, starting from HTML to implementation of design patterns from "gang of four". .</p>
    </div>
    
    <button class="demo">part3</button>
    <div id="foo" class="abc">
      <p>Like most of our kind we are a custom software development company. Our different units for design, application development (desktop, web and mobile) and QA help us satisfy all your technology needs. Our complete ecosystem revolves around the quality of codes and services we provide to our clients. Our team works hard to improve itself, starting from HTML to implementation of design patterns from "gang of four". .</p>
    </div>
    
    <script>
    var j = document.getElementsByClassName("demo");
    var i;
    
    for (i = 0; i < j.length; i++) {
        j[i].onclick = function(){
            this.classList.toggle("active");
            this.nextElementSibling.classList.toggle("show");
      }
    }
    </script>
    
    </body>
    </html>
    

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: