<script type="text/javascript">
var product_features = ['draggable','trackable','colorable'];
$(document).ready(function() {
$('div#input .feature draggable').remove();
});
<h3>Input</h3>
<div id="input">
<div class="feature draggable">Drag 1</div>
<div class="feature resizable">Resize</div>
<div class="feature downloadable">Download</div>
<div class="feature draggable">Drag 2</div>
<div class="feature trackable">Track</div>
<div class="feature colorable">Color</div>
</div>
<h3>Output</h3>
<div id="output"></div>
無法移除一個div類元件與特徵可拖動
$('div#input .feature draggable').remove();
似乎這部分代碼有問題,請問這裏有什麼問題嗎?
JS小提琴:http://jsfiddle.net/9CzMG/47/
'draggable'是一個類,不是功能! – adeneo
我想刪除類名稱的元素:可拖動,我怎麼能這樣做? – KAPILP
如何嘗試下面的一個很好的答案? – adeneo