我有以下HTMLjQuery的选择显示
<div class="foo">
<a href="" class="bar1">Bar1</a>
<a href="" class="bar2">Bar2</a>
</div>
假设包含.foo是隐藏在默认情况下的话,我只是想表明包含.foo和他的孩子.bar1这孩子。如何在jQuery中做到这一点?
我有这个在我的jQuery
$('#' + id).children(".foo //anything I can do here to select ONLY bar1 to show? ").show();
完成。谢谢......... – vzhen