4
我想要放在一個div中的圖像,以創建圖像克隆裏面的那個div的編號是cesta,但我只得到禁止符號。jquery draggable不允許拖動克隆圖像
HTML
<div id='productos' >
<h3>PRODUCTOS</h3>
<img id='ali-12' name='serv' class='productos' src='img/objects_139.jpg' />
<img id='mon-23' name='serv' class='productos' src='img/objects_132.jpg' />
<img id='zap-32' name='serv' class='productos' src='img/objects_135.jpg' />
<img id='gua-21' name='serv' class='productos' src='img/objects_102.jpg' />
<img id='rod-11' name='serv' class='productos' src='img/objects_136.jpg' />
<img id='maz-44' name='serv' class='productos' src='img/objects_137.jpg' />
<img id='lla-97' name='serv' class='productos' src='img/objects_138.jpg' />
<img id='par-10' name='serv' class='productos' src='img/objects_126.jpg' />
<img id='cru-24' name='serv' class='productos' src='img/objects_121.jpg' />
<img id='gaf-15' name='serv' class='productos' src='img/objects_131.jpg' />
</div>
<div id='cesta'>
</div>
JAVASCRIPT
$(document).ready(function(){
$(".productos").draggable({helper:'clone'});
$("#cesta").droppable({
accept: ".productos",
drop: function(event,ui){
$(this).append($(ui.draggable).clone());
}
});
});
您使用的是什麼瀏覽器?作品在這裏:http://jsfiddle.net/gaVb7/ – 2013-05-06 18:36:49
@roasted Firefox的最後一個版本 – jal 2013-05-06 18:38:46
這適用於我在Firefox下v20.0.1:http://jsfiddle.net/Cz649/ – 2013-05-06 18:45:57