For example:
<h1 class="title">This is a title</h1>
<p>Post body text</p>
<p class="postfooter">Today's date: blah. posted by: blah</p>
<button>Do stuff</button>
<h1 class="title">This is a totally different title</h1>
<p>Post body text</p>
<p class="postfooter">Today's date: blah. posted by: blah</p>
<button>Do stuff</button>
<h1 class="title">and this is another title still</h1>
<p>Post body text</p>
<p class="postfooter">Today's date: blah. posted by: blah</p>
<button>Do stuff</button>
What I would like is to have it so that when the user clicks a button, the corresponding title slides down.
So far, I've tried something like (though I've also tried different combos of closest(), parent(), sibling(), etc):
$("button").click(function(){
var currentTitle = $(this).????(".title").text();
$("playerTitleNormallyHidden").slideDown(500).delay(2000).slideUp(500);
});
I'm sure this is probably super easy, but I am stuck.