我很难做到这一点。基本上有一个微博帖子列表。每篇文章之后都有一个编辑表单,但最初设置为在 css 中不显示。我只想显示 (slideToggle) 编辑表单,它直接位于单击编辑链接 ($this) 的微博帖子之后。
注意:在下面的描述中我只提到。我的意思是页面上有很多编辑表单,但我只想显示article.post之后点击a.edit_this的那个。
<div id="microblog">
<article class="post">
<figure class="av">
<img src="avatarurl" alt="">
</figure>
<div class="post_text">
<h3>Post title <span> <a href="#" class="edit_this">Edit link</a></span> <span>Delete</span></h3>
<div class="postmeta">Date<span>Time</span></div>
<p>Post body</p>
<br>
<a href="#" class="details">Details</a>
</div>
</article> <-- End of micropost
<form class="edit_form"> <-- Need to show only this when clicking on the .edit_this
link in the above micropost
</form>
<article class="post"> <-- Beginning of next micropost
<figure class="av">
<img src="avatarurl" alt="">
</figure>
<div class="post_text">
<h3>Post title <span> <a href="#" class="edit_this">Edit link</a></span> <span>Delete</span></h3>
<div class="postmeta">Date<span>Time</span></div>
<p>Post body</p>
<br>
<a href="#" class="details">Details</a>
</div>
**</article>** <-- End of micropost