Posted in: Jquery

Simple Jquery Accordion – Simple Jquery CSS Accordion

Simple Jquery Accordion. Jquery Accordion with CSS, In this example you will learn how to make Jquery CSS Accordion. …….. its an old script but here i am putting it by making it too much simple and easy to use. It will include the Jquery and CSS and some Html text. So lets start with Jquery Accordion.

We will use three script here- 1 Jquery, 2 Css, 3 Html.

Step 1. Html

<div id="myaccordion" class="accordion">
                    <p class="header blue">Your Name</p>
                        <div class="contentarea">
                            <span>You can also put image here</span>
                    <p class="header green">Your Image</p>
                        <div class="contentarea">
                            <a>You can post a link too</a>
                    <p class="header grey">Your Detail</p>
                        <div class="contentarea">
                            <span>Hello its me</span>

Now we will use the CSS for its Design.

Step 2. CSS

        .accordion {
	width: 300px;
.header {
	padding: 5px 10px;
	cursor: pointer;
	position: relative;
       color: #fff;
.contentarea {
.contentarea a, span {
  padding-top: 8px;
  padding-bottom: 8px;

.contentarea p {
  margin: 0;
.contentarea a:hover {
  color: #000000;
.green{background: #4fc0ae;}
.grey{background: #58595b;}
.blue{background-color: #459EE9;}

Now we will add our Jquery Code

Step 3.  Jquery

    $("#myaccordion p.header").click(function()

You can change the effect like at last if you add slideUp it will work differently

So Now we have completed the Tutorial.

Comment (1) on "Simple Jquery Accordion – Simple Jquery CSS Accordion"

Leave a Reply

Your email address will not be published. Required fields are marked *