GithubHelp home page GithubHelp logo

renamathai / j-accordion.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from misjerrywu/j-accordion.js

0.0 2.0 0.0 144 KB

j-accordion.js is a jQuery accordion plugin just like the one on the NVIDIA homepage (http://www.nvidia.com/page/home.html)

j-accordion.js's Introduction

j-accordion.js

j-accordion.js is a jQuery accordion plugin just like the one on the NVIDIA homepage (http://www.nvidia.com/page/home.html)

You can see the demo HERE.

Include the following CSS in the HTML header:

<!-- YUI 3 CSS -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?3.12.0/cssreset/cssreset-min.css&3.12.0/cssfonts/cssfonts-min.css&3.12.0/cssgrids/cssgrids-min.css&3.12.0/cssbase/cssbase-min.css">

<!-- j-accordion style CSS -->
<link rel="stylesheet" type="text/css" href="style.css">

This is the basic HTML structure required:

<div class="accordion_container">
    <h1>Title 1</h1>
    <div class="accordion">
        <div class="first current">
            <div class="content"><img src="http://placehold.it/200x95" /></div>
            <div class="tab">
                <strong>Sub Title 1-1</strong>
                <p>Content 1-1</p>
            </div>
        </div>
        <div class="second">
            <div class="content second"><img src="http://placehold.it/200x95" /></div>
            <div class="tab">
                <strong>Sub Title 1-2</strong>
                <p>Content 1-2</p>
            </div>
        </div>
        <div class="third">
            <div class="content third"><img src="http://placehold.it/200x95" /></div>
            <div class="tab">
                <strong>Sub Title 1-3</strong>
                <p>Content 1-3</p>
            </div>
        </div>
    </div>
</div>

The JavaScript before the closing body tag:

<body>

    Here is the content

    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript" src="j-accordin.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
        $('.accordion').jaccordion();
    });
    </script>
</body>

j-accordion.js's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.