我需要一个 jQuery 选择器来定位FooClass
和BarClass
通过 #MainSelector
<div id='MainSelector1'>
<fieldset>
<legend>Toto</legend>
<div class='section'>
<label>Koko</label>
<div>
<input type='text' id='KokoId'>
</div>
</div>
<div class='section'>
<label>Foo</label>
<div>
<select class='FooClass' />
</div>
</div>
<div class='section'>
<label>Bar</label>
<div>
<select class='BarClass' />
</div>
</div>
</fieldset>
</div>
<div id='MainSelector2'>
<fieldset>
<legend>Toto</legend>
<div class='section'>
<label>Koko</label>
<div>
<input type='text' id='KokoId'>
</div>
</div>
<div class='section'>
<label>Foo</label>
<div>
<select class='FooClass' />
</div>
</div>
<div class='section'>
<label>Bar</label>
<div>
<select class='BarClass' />
</div>
</div>
</fieldset>
</div>
应该是这样的
$("#MainSelector1.FooClass").Css('display', none);
$("#MainSelector1.BarClass").Css('display', none);
$("#MainSelector2.FooClass").Css('display', none);
$("#MainSelector2.BarClass").Css('display', none);