我想隱藏下拉(選擇元素)使用隱藏,但不能夠。下面是我使用的jQuery代碼。jQuery隱藏()不工作
$('.myClass').find('select[name=xyz]').hide();
異常鉻:對象XYZ有沒有方法 '隱藏'
相應的HTML
<div class="myClass">
<select id="xyz" name="xyz">
<option>option1</option>
<option>option2</option>
</select>
<select id="123" name="123">
<option>option3</option>
<option>option4</option>
</select>
</div>
爲什麼不只是:'$('#xyz')。hide();'? – steveax