I need to make a function that when just clicked on the div with the last class is visible and the rest is hidden.
<a href="javascript:teste('minhaDiv');" class="expander">Link</a>
<a href="javascript:teste('minhaDivo');" class="expander">Link</a>
<div class="container">
<div class="minhaDiv" style="display: none">Div que aparece e some</div>
<div class="minhaDiv" style="display: none">Div que aparece e some</div>
<div class="minhaDiv" style="display: none">Div que aparece e some</div>
<div class="minhaDivo" style="display: none">Div que aparece e some</div>
<div class="minhaDivo" style="display: none">Div que aparece e some</div>
</div>
function teste(div){
$('.container').each(function() {
if($(this).attr('class') = div){
$(this).show();
}else{
$(this).hide()
};
});
}