JQuery Drag / Drop und Klonen

Hallo, ich muss dies erreichen.

Ich habe eine Reihe von ablegbaren Gegenständen (im Grunde lege ich Entwürfe auf ein Kleidungsstück) und ich lasse einen Klon fallen.

Wenn mir das abgelegte Objekt (Designs) nicht gefällt, möchte ich es löschen, indem ich so etwas wie versteckt mache.

Aber das kann ich nicht.

Bitte hilf mir..

Hier ist der Code
    var clone;
    $(document).ready(function(){
        $(".items").draggable({helper: 'clone',cursor: 'hand'});


     $(".droparea").droppable({
                    accept: ".items",
                    hoverClass: 'dropareahover',
                    tolerance: 'pointer',
                    drop: function(ev, ui)
                    {

              var dropElemId = ui.draggable.attr("id");

              var dropElem = ui.draggable.html();

                      clone = $(dropElem).clone(); // clone it and hold onto the jquery object
                      clone.id="newId";
                      clone.css("position", "absolute");
          clone.css("top", ui.absolutePosition.top);
                      clone.css("left", ui.absolutePosition.left);
              clone.draggable({ containment: 'parent' ,cursor: 'crosshair'});

                      $(this).append(clone);
                      alert("done dragging ");

                      /lets assume I have a delete button when I click that clone should dissapear so that I can drop another design - but the following code has no effect 
                      //and the item is still visible , how to make it dissapear ?
                      $('#newId').css("visibility","hidden");



               }
        });



    });

Antworten auf die Frage(2)

Ihre Antwort auf die Frage