JEbomajkuuu!!

by lovromar

HTML

<div class="item">
    <a href="">element1</a> <span>span1</span><b>play</b> <br>
</div>

<div class="item">
    <a href="">element2</a> <span>span2</span><b>Play</b><br>
</div>
    
<div class="item">
    <a href="">element3</a> <span>span3</span><b>play</b><br>
</div>
    
<div class="item">
    <a href="">element4</a> <span>span4</span><b>play</b><br>
</div>

JavaScript

$('.item span').hide();
$('.item b').show();

$('.item a').click(function(e){
    
    e.preventDefault();
    // hide all span
    var $this = $(this).parent().find('span,b');
    $(".item span").not($this).hide();
    $(".item b").not($this).hide();
    $(".item b").not($this).show();
    

    
    // here is what I want to do
    $this.toggle();
    
});