我有多行,article
里面有我在.article-row
里面.content
,然后.article-row
被点击。当前的 jQuery 会找到.content
然后切换它。但是我想更改代码,以便.hide()
所有实例.content
都与单击的实例无关
$('.article-row').click(function(){
$(this).parent().find('.content').toggle();
});
<article class="feed1 entry">
<span class="article-row">
<span class="article-row-title">I am the title</span>
<span class="article-row-date">Sat, 07 Sep 2013 02:13:35 -0700</span>
</span>
<div class="content">
<p>I AM THE CONTENT</p>
</div>
</article>
关联Here