JSFiddle - React, Tailwind, and code Playground

by Cone

HTML

<p class="dropD">JOURI</p>
<div>
    some shit here
</div>
    <p class="dropD">JOURI</p>
<div>
    some shit here
</div>
<p> Go one</p>

CSS

.dropD {
padding-left:25px;        
cursor:pointer;
background:url(http://s10.postimg.org/6wun89yz9/plus.png) no-repeat 0 center;
}

.dropD +div {
display:none;
}

JavaScript

$('.dropD').click(function(){
    if($(this).next('div').is(':visible')){
       $(this).next('div').slideUp();
       $(this).css('background-image','url(http://s10.postimg.org/6wun89yz9/plus.png)');
    } else {
       $(this).next('div').slideDown();
        $(this).css('background-image','url(http://s17.postimg.org/tjy9z464b/minus.png)');
    }
});