JSFiddle - React, Tailwind, and code Playground

Accordion Style

by Jennifer Perrin

HTML

<!-- Dummy text via http://loremricksum.pixelcutters.com/ -->

<a href="">Toggle #1</a>
<div>We're no strangers to love, You know the rules and so do I, A full commitment's what I'm thinking of, You wouldn't get this from any other guy, I just wanna tell you how I'm feeling, Gotta make you understand</div>

<a href="">Toggle #2</a>
<div>Never gonna give you up, Never gonna let you down, Never gonna run around and desert you, Never gonna make you cry, Never gonna say goodbye, Never gonna tell a lie and hurt you</div>

<a href="">Toggle #3</a>
<div>We've known each other for so long, Your heart's been aching but, You're too shy to say it, Inside we both know what's been going on, We know the game and we're gonna play it...</div>

SCSS

* { font-family: Calibri, Helvetica, Arial, sans-serif; font-size: 10; line-height: 20px;}
a, div { 
    float: left;
    clear: both;
    width: 100%;
}
a {
    margin-bottom: 1px;
    padding: 10px;
    color: #fff;
    background: #222;
    text-decoration: none;
}
div { 
    padding: 5px;
    background: #eee;
    margin: 0px 0px 1px 0px;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

JavaScript

$('div').hide();
$('a').click(function() {
    $(this).next().slideToggle('slow');
    return false;
});