I am trying to create a wrapper div with a button and a hidden div inside. When the button is clicked, I want the div to be displayed. Since this structure appears multiple times on my webpage, I prefer not to use ids. Can you suggest the correct jQuery command for this scenario?
HTML
<div class="wrap">
<div class="button"> see more </div>
<div class="moreInfos"> Lorem ipsum... </div>
</div>
CSS
.moreInfos{ display: none;}
jQuery
$(".wrapp").on('click', '.button', function(){
$(this).parent('.moreInfos').css('display', 'block');
});