<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>
</p>
无法删除具有可拖动功能的 div 类元素
$('div#input .feature draggable').remove();
这部分代码似乎有问题,有人可以指出这里有什么问题吗?
JS 小提琴:http: //jsfiddle.net/9CzMG/47/